@linzjs/step-ag-grid 14.9.0 → 14.9.2
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/package.json
CHANGED
package/src/components/Grid.tsx
CHANGED
|
@@ -124,7 +124,7 @@ export const Grid = ({
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
const headerCellCount = gridDivRef.current?.getElementsByClassName("ag-header-cell-label")?.length;
|
|
127
|
-
if (headerCellCount
|
|
127
|
+
if (headerCellCount < 2) {
|
|
128
128
|
// Don't resize grids until all the columns are visible
|
|
129
129
|
// as `autoSizeColumns` will fail silently in this case
|
|
130
130
|
needsAutoSize.current = true;
|
|
@@ -391,7 +391,7 @@ export const GridContextProvider = <RowType extends GridBaseRow>(props: GridCont
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
if (!rowNode.isSelected()) {
|
|
394
|
-
rowNode.setSelected(true,
|
|
394
|
+
rowNode.setSelected(true, true);
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
// Cell already being edited, so don't re-edit until finished
|
package/src/lui/timeoutHook.tsx
CHANGED
|
@@ -43,11 +43,17 @@ interface IntervalHookProps {
|
|
|
43
43
|
timeoutMs: number;
|
|
44
44
|
callback: () => void;
|
|
45
45
|
}
|
|
46
|
+
|
|
46
47
|
export const useIntervalHook = ({ callback, timeoutMs }: IntervalHookProps) => {
|
|
48
|
+
const callbackRef = useRef(callback);
|
|
49
|
+
callbackRef.current = callback;
|
|
50
|
+
|
|
47
51
|
useEffect(() => {
|
|
48
|
-
const interval = setInterval(
|
|
52
|
+
const interval = setInterval(() => {
|
|
53
|
+
callbackRef.current && callbackRef.current();
|
|
54
|
+
}, timeoutMs);
|
|
49
55
|
return () => {
|
|
50
56
|
clearInterval(interval);
|
|
51
57
|
};
|
|
52
|
-
});
|
|
58
|
+
}, [timeoutMs]);
|
|
53
59
|
};
|