@linzjs/step-ag-grid 29.2.1 → 29.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/src/components/Grid.d.ts +1 -2
- package/dist/step-ag-grid.cjs +4 -4
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +4 -4
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +3 -5
- package/src/stories/grid/gridAutosize/ShowPanelResizingAgGrid/ShowPanelResizingStepAgGrid.tsx +1 -1
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -2760,7 +2760,7 @@ ModuleRegistry.registerModules([AllCommunityModule]);
|
|
|
2760
2760
|
/**
|
|
2761
2761
|
* Wrapper for AgGrid to add commonly used functionality.
|
|
2762
2762
|
*/
|
|
2763
|
-
const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection = 'multiple', suppressColumnVirtualization = true, theme = 'ag-theme-step-default', sizeColumns = 'auto', selectColumnPinned = 'left', contextMenuSelectRow = false, singleClickEdit = false, rowData, rowHeight = theme === 'ag-theme-step-default' ? 40 : theme === 'ag-theme-step-compact' ? 36 : 40, selectable,
|
|
2763
|
+
const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection = 'multiple', suppressColumnVirtualization = true, theme = 'ag-theme-step-default', sizeColumns = 'auto', selectColumnPinned = 'left', contextMenuSelectRow = false, singleClickEdit = false, rowData, rowHeight = theme === 'ag-theme-step-default' ? 40 : theme === 'ag-theme-step-compact' ? 36 : 40, selectable, onCellFocused: paramsOnCellFocused, ...params }) => {
|
|
2764
2764
|
const { gridReady, gridRenderState, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnBulkEditingComplete, getColDef, showNoRowsOverlay, prePopupOps, startCellEditing, } = useGridContext();
|
|
2765
2765
|
const { updatedDep, updatingCols } = useContext(GridUpdatingContext);
|
|
2766
2766
|
const gridDivRef = useRef(null);
|
|
@@ -2837,7 +2837,7 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
2837
2837
|
*/
|
|
2838
2838
|
useInterval(() => {
|
|
2839
2839
|
// If grid has become visible after previously being hidden, then refocus the last focused cell.
|
|
2840
|
-
const visible = !!gridDivRef.current?.checkVisibility();
|
|
2840
|
+
const visible = !!gridDivRef.current?.checkVisibility?.();
|
|
2841
2841
|
if (visible && !wasVisibleRef.current) {
|
|
2842
2842
|
wasVisibleRef.current = true;
|
|
2843
2843
|
const el = window.__stepaggrid_lastfocuseventtarget;
|
|
@@ -3123,7 +3123,7 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
3123
3123
|
* Resize columns to fit if required on window/container resize
|
|
3124
3124
|
*/
|
|
3125
3125
|
const onGridSizeChanged = useCallback((event) => {
|
|
3126
|
-
if (sizeColumns !== 'none'
|
|
3126
|
+
if (sizeColumns !== 'none') {
|
|
3127
3127
|
const columnLimits = [
|
|
3128
3128
|
...userSizedColIds.current.entries().map(([c, w]) => ({
|
|
3129
3129
|
key: c,
|
|
@@ -3132,7 +3132,7 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
3132
3132
|
];
|
|
3133
3133
|
event.api.sizeColumnsToFit({ columnLimits });
|
|
3134
3134
|
}
|
|
3135
|
-
}, [
|
|
3135
|
+
}, [sizeColumns]);
|
|
3136
3136
|
/**
|
|
3137
3137
|
* Set of column I'd's that are prevented from auto-sizing as they are user set
|
|
3138
3138
|
*/
|