sag_components 2.0.0-beta190 → 2.0.0-beta191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12262,16 +12262,13 @@ const Td$1 = styled__default["default"].td`
12262
12262
  `;
12263
12263
  const Tr = styled__default["default"].tr`
12264
12264
  border-bottom: 1px solid #f3f4f6;
12265
- ${_ref => {
12266
- let {
12267
- enableHover,
12268
- selectHoverColor
12269
- } = _ref;
12270
- return enableHover && `&:hover {
12265
+ ${({
12266
+ enableHover,
12267
+ selectHoverColor
12268
+ }) => enableHover && `&:hover {
12271
12269
  background-color: ${selectHoverColor};
12272
12270
  cursor: pointer;
12273
- }`;
12274
- }}
12271
+ }`}
12275
12272
  `;
12276
12273
  const InfoText = styled__default["default"].div`
12277
12274
  font-weight: 400;
@@ -39843,6 +39840,25 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
39843
39840
  console.warn("TableBody: Invalid data or columns prop");
39844
39841
  return null;
39845
39842
  }
39843
+
39844
+ // Expose methods to parent component via ref
39845
+ React$1.useImperativeHandle(ref, () => ({
39846
+ clearFocus: () => {
39847
+ setFocusedRowIndex(null);
39848
+ setHoveredRowIndex(null);
39849
+ },
39850
+ setFocus: index => {
39851
+ setFocusedRowIndex(index);
39852
+ },
39853
+ getFocusedIndex: () => {
39854
+ return focusedRowIndex;
39855
+ },
39856
+ clearSelection: () => {
39857
+ setFocusedRowIndex(null);
39858
+ setHoveredRowIndex(null);
39859
+ setOpenDropdowns({});
39860
+ }
39861
+ }), [focusedRowIndex]);
39846
39862
  React$1.useEffect(() => {
39847
39863
  if (isCommentModalOpen && currentCommentRow !== null && data[currentCommentRow]) {
39848
39864
  const initialText = data[currentCommentRow]?.Comments || "";