@linzjs/step-ag-grid 17.0.0 → 17.0.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.
@@ -2512,8 +2512,8 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2512
2512
  {
2513
2513
  colId: "selection",
2514
2514
  editable: false,
2515
- minWidth: 42,
2516
- maxWidth: 42,
2515
+ minWidth: 48,
2516
+ maxWidth: 48,
2517
2517
  pinned: selectColumnPinned,
2518
2518
  headerComponentParams: {
2519
2519
  exportable: false,
@@ -4593,7 +4593,7 @@ const GridContextProvider = (props) => {
4593
4593
  /**
4594
4594
  * Get ColDefs, with flattened ColGroupDefs
4595
4595
  */
4596
- const getColumns = useCallback((filterDef = () => true) => filter(columnApi?.getAllColumns()?.map((col) => col.getColDef()) ?? [], filterDef), [columnApi]);
4596
+ const getColumns = useCallback((filterDef = () => true) => filter(columnApi?.getColumns()?.map((col) => col.getColDef()) ?? [], filterDef), [columnApi]);
4597
4597
  const getColumnIds = useCallback((filterDef = () => true) => compact(getColumns(filterDef).map(getColId)), [getColumns]);
4598
4598
  /**
4599
4599
  * Internal method for selecting and flashing rows.
@@ -4865,9 +4865,14 @@ const GridContextProvider = (props) => {
4865
4865
  return ok;
4866
4866
  });
4867
4867
  }, [gridApiOp, modifyUpdating, selectNextEditableCell]);
4868
- const redrawRows = useCallback((rowNodes) => {
4869
- gridApiOp((gridApi) => gridApi.redrawRows(rowNodes ? { rowNodes } : undefined));
4870
- }, [gridApiOp]);
4868
+ const redrawRows = useMemo(() => debounce((rowNodes) => {
4869
+ try {
4870
+ gridApi && gridApi.redrawRows(rowNodes ? { rowNodes } : undefined);
4871
+ }
4872
+ catch (ex) {
4873
+ console.error(ex);
4874
+ }
4875
+ }, 50), [gridApi]);
4871
4876
  // waitForExternallySelectedItemsToBeInSync can't use the state as it won't be updated during function execution
4872
4877
  const externallySelectedItemsAreInSyncRef = useRef(false);
4873
4878
  useEffect(() => {