@linzjs/step-ag-grid 27.2.0 → 27.2.1
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
|
@@ -62,7 +62,7 @@ export const GridContextProvider = <TData extends GridBaseRow>(props: PropsWithC
|
|
|
62
62
|
if (!noApiFn) {
|
|
63
63
|
noApiFn = (() => {}) as () => R;
|
|
64
64
|
}
|
|
65
|
-
return gridApi ? hasApiFn(gridApi) : noApiFn();
|
|
65
|
+
return gridApi && !gridApi.isDestroyed() ? hasApiFn(gridApi) : noApiFn();
|
|
66
66
|
},
|
|
67
67
|
[gridApi],
|
|
68
68
|
);
|
|
@@ -290,9 +290,9 @@ export const GridContextProvider = <TData extends GridBaseRow>(props: PropsWithC
|
|
|
290
290
|
colId &&
|
|
291
291
|
delay(() => {
|
|
292
292
|
if (
|
|
293
|
+
!gridApi.isDestroyed() &&
|
|
293
294
|
isEmpty(gridApi.getEditingCells()) &&
|
|
294
|
-
(!ifNoCellFocused || gridApi.getFocusedCell() == null)
|
|
295
|
-
!gridApi.isDestroyed()
|
|
295
|
+
(!ifNoCellFocused || gridApi.getFocusedCell() == null)
|
|
296
296
|
) {
|
|
297
297
|
gridApi.setFocusedCell(rowIndex, colId);
|
|
298
298
|
// It may be that the first cell is the selection cell, this doesn't exist as a colDef
|
|
@@ -456,7 +456,9 @@ export const GridContextProvider = <TData extends GridBaseRow>(props: PropsWithC
|
|
|
456
456
|
* Resize columns to fit container
|
|
457
457
|
*/
|
|
458
458
|
const sizeColumnsToFit = useCallback((): void => {
|
|
459
|
-
gridApi?.
|
|
459
|
+
if (gridApi && !gridApi?.isDestroyed()) {
|
|
460
|
+
gridApi.sizeColumnsToFit();
|
|
461
|
+
}
|
|
460
462
|
}, [gridApi]);
|
|
461
463
|
|
|
462
464
|
const stopEditing = useCallback((): void => {
|
|
@@ -640,6 +642,10 @@ export const GridContextProvider = <TData extends GridBaseRow>(props: PropsWithC
|
|
|
640
642
|
// async processes need to refresh their own rows
|
|
641
643
|
// gridApi.refreshCells({ rowNodes: selectedRows as RowNode[], force: true });
|
|
642
644
|
|
|
645
|
+
if (gridApi.isDestroyed()) {
|
|
646
|
+
return ok;
|
|
647
|
+
}
|
|
648
|
+
|
|
643
649
|
if (ok) {
|
|
644
650
|
const cell = gridApi.getFocusedCell();
|
|
645
651
|
if (cell && gridApi.getFocusedCell() == null) {
|