@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/dist/step-ag-grid.cjs +9 -2
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +9 -2
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +4 -2
- package/src/components/GridCellFiller.tsx +1 -0
- package/src/contexts/GridContextProvider.tsx +4 -0
package/package.json
CHANGED
package/src/components/Grid.tsx
CHANGED
|
@@ -423,7 +423,8 @@ export const Grid = <TData extends GridBaseRow = GridBaseRow>({
|
|
|
423
423
|
*/
|
|
424
424
|
const onCellDoubleClick = useCallback(
|
|
425
425
|
(event: CellDoubleClickedEvent) => {
|
|
426
|
-
|
|
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
|
-
|
|
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
|
},
|
|
@@ -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[] = [];
|