@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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "27.2.1",
5
+ "version": "27.2.3",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -423,7 +423,8 @@ export const Grid = <TData extends GridBaseRow = GridBaseRow>({
423
423
  */
424
424
  const onCellDoubleClick = useCallback(
425
425
  (event: CellDoubleClickedEvent) => {
426
- if (!invokeEditAction(event)) {
426
+ const editable = fnOrVar(event.colDef?.editable, event);
427
+ if (editable && !invokeEditAction(event)) {
427
428
  void startCellEditing({ rowId: event.data.id, colId: event.column.getColId() });
428
429
  }
429
430
  },
@@ -435,7 +436,8 @@ export const Grid = <TData extends GridBaseRow = GridBaseRow>({
435
436
  */
436
437
  const onCellClicked = useCallback(
437
438
  (event: CellClickedEvent) => {
438
- if (event.colDef.singleClickEdit ?? singleClickEdit) {
439
+ const editable = fnOrVar(event.colDef?.editable, event);
440
+ if ((editable && event.colDef.singleClickEdit) ?? singleClickEdit) {
439
441
  void startCellEditing({ rowId: event.data.id, colId: event.column.getColId() });
440
442
  }
441
443
  },
@@ -10,4 +10,5 @@ export const GridCellFiller = <TData extends GridBaseRow>(): ColDef<TData, any>
10
10
  colId: GridCellFillerColId,
11
11
  headerName: '',
12
12
  flex: 1,
13
+ editable: false,
13
14
  });
@@ -509,6 +509,7 @@ export const GridContextProvider = <TData extends GridBaseRow>(props: PropsWithC
509
509
  const shouldSelectNode = !rowNode.isSelected();
510
510
  if (shouldSelectNode) {
511
511
  externallySelectedItemsAreInSyncRef.current = false;
512
+ setExternallySelectedItemsAreInSync(false);
512
513
  rowNode.setSelected(true, true);
513
514
  await waitForExternallySelectedItemsToBeInSync();
514
515
  }
@@ -692,6 +693,9 @@ export const GridContextProvider = <TData extends GridBaseRow>(props: PropsWithC
692
693
  const onFilterChanged = useMemo(
693
694
  () =>
694
695
  debounce(() => {
696
+ if (!gridApi || gridApi?.isDestroyed()) {
697
+ return;
698
+ }
695
699
  // This is terrible, but there's no other way for me to check whether a filter has changed the grid
696
700
  const getDisplayedRowsHash = () => {
697
701
  const arr: any[] = [];