@linzjs/step-ag-grid 27.2.3 → 27.3.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/dist/src/components/Grid.d.ts +2 -0
- package/dist/step-ag-grid.cjs +8 -4
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +8 -4
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +8 -2
- package/src/components/clickInputWhenContainingCellClicked.tsx +4 -2
- package/src/stories/grid/GridReadOnly.stories.tsx +2 -0
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -665,9 +665,10 @@ const clickInputWhenContainingCellClicked = (params) => {
|
|
|
665
665
|
if (!cell)
|
|
666
666
|
return;
|
|
667
667
|
const input = cell.querySelector('input, button');
|
|
668
|
-
if (!input)
|
|
668
|
+
if (!input) {
|
|
669
669
|
return;
|
|
670
|
-
|
|
670
|
+
}
|
|
671
|
+
input.dispatchEvent(event);
|
|
671
672
|
};
|
|
672
673
|
setTimeout(clickInput, 20);
|
|
673
674
|
};
|
|
@@ -3185,7 +3186,8 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
3185
3186
|
const headerRowCount = columnDefs.some((c) => c.children) ? 2 : 1;
|
|
3186
3187
|
return (jsxs("div", { "data-testid": dataTestId, className: clsx('Grid-container', theme, 'theme-specific', staleGrid && 'Grid-sortIsStale', gridReady && rowData && autoSized && 'Grid-ready'), children: [gridContextMenu.component, jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsx(AgGridReact, { theme: 'legacy', rowSelection: selectable
|
|
3187
3188
|
? {
|
|
3188
|
-
|
|
3189
|
+
enableSelectionWithoutKeys: params.enableSelectionWithoutKeys ?? false,
|
|
3190
|
+
enableClickSelection: params.enableClickSelection ?? false,
|
|
3189
3191
|
mode: rowSelection == 'single' ? 'singleRow' : 'multiRow',
|
|
3190
3192
|
}
|
|
3191
3193
|
: undefined, rowHeight: rowHeight, animateRows: params.animateRows ?? false, rowClassRules: params.rowClassRules, getRowId: (params) => `${params.data.id}`, onGridSizeChanged: onGridSizeChanged, suppressColumnVirtualisation: suppressColumnVirtualization, suppressClickEdit: true, onColumnVisible: setInitialContentSize, onRowDataUpdated: onRowDataChanged, onCellKeyDown: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, domLayout: params.domLayout, onColumnResized: onColumnResized, defaultColDef: { minWidth: 48, ...omit(params.defaultColDef, ['editable']) }, columnDefs: columnDefsAdjusted, rowData: rowData, noRowsOverlayComponent: (event) => {
|
|
@@ -3217,7 +3219,9 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
3217
3219
|
}
|
|
3218
3220
|
return false;
|
|
3219
3221
|
},
|
|
3220
|
-
onCellClicked:
|
|
3222
|
+
onCellClicked: params.enableSelectionWithoutKeys || params.enableClickSelection
|
|
3223
|
+
? undefined
|
|
3224
|
+
: clickInputWhenContainingCellClicked,
|
|
3221
3225
|
} }) })] }));
|
|
3222
3226
|
};
|
|
3223
3227
|
|