@linzjs/step-ag-grid 27.2.1 → 27.2.3

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.
@@ -2990,7 +2990,8 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
2990
2990
  * Handle double click edit
2991
2991
  */
2992
2992
  const onCellDoubleClick = useCallback((event) => {
2993
- if (!invokeEditAction(event)) {
2993
+ const editable = fnOrVar(event.colDef?.editable, event);
2994
+ if (editable && !invokeEditAction(event)) {
2994
2995
  void startCellEditing({ rowId: event.data.id, colId: event.column.getColId() });
2995
2996
  }
2996
2997
  }, [startCellEditing]);
@@ -2998,7 +2999,8 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
2998
2999
  * Handle single click edits
2999
3000
  */
3000
3001
  const onCellClicked = useCallback((event) => {
3001
- if (event.colDef.singleClickEdit ?? singleClickEdit) {
3002
+ const editable = fnOrVar(event.colDef?.editable, event);
3003
+ if ((editable && event.colDef.singleClickEdit) ?? singleClickEdit) {
3002
3004
  void startCellEditing({ rowId: event.data.id, colId: event.column.getColId() });
3003
3005
  }
3004
3006
  }, [singleClickEdit, startCellEditing]);
@@ -3404,6 +3406,7 @@ const GridCellFiller = () => ({
3404
3406
  colId: GridCellFillerColId,
3405
3407
  headerName: '',
3406
3408
  flex: 1,
3409
+ editable: false,
3407
3410
  });
3408
3411
 
3409
3412
  const Editor = (props) => ({
@@ -5376,6 +5379,7 @@ const GridContextProvider = (props) => {
5376
5379
  const shouldSelectNode = !rowNode.isSelected();
5377
5380
  if (shouldSelectNode) {
5378
5381
  externallySelectedItemsAreInSyncRef.current = false;
5382
+ setExternallySelectedItemsAreInSync(false);
5379
5383
  rowNode.setSelected(true, true);
5380
5384
  await waitForExternallySelectedItemsToBeInSync();
5381
5385
  }
@@ -5516,6 +5520,9 @@ const GridContextProvider = (props) => {
5516
5520
  }
5517
5521
  }, 50), [gridApi]);
5518
5522
  const onFilterChanged = useMemo(() => debounce(() => {
5523
+ if (!gridApi || gridApi?.isDestroyed()) {
5524
+ return;
5525
+ }
5519
5526
  // This is terrible, but there's no other way for me to check whether a filter has changed the grid
5520
5527
  const getDisplayedRowsHash = () => {
5521
5528
  const arr = [];