@linzjs/step-ag-grid 26.0.1 → 26.1.0
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.
|
@@ -13,6 +13,7 @@ export interface GridProps<TData extends GridBaseRow = GridBaseRow> {
|
|
|
13
13
|
readOnly?: boolean;
|
|
14
14
|
defaultPostSort?: boolean;
|
|
15
15
|
selectable?: boolean;
|
|
16
|
+
hideSelectColumn?: boolean;
|
|
16
17
|
theme?: string;
|
|
17
18
|
['data-testid']?: string;
|
|
18
19
|
domLayout?: GridOptions['domLayout'];
|
package/dist/step-ag-grid.cjs
CHANGED
|
@@ -3180,6 +3180,7 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
3180
3180
|
}, [params, clearHighlightRowClasses]);
|
|
3181
3181
|
// This is setting a ref in the GridContext so won't be triggering an update loop
|
|
3182
3182
|
setOnCellEditingComplete(params.onCellEditingComplete);
|
|
3183
|
+
const selectWidth = params.hideSelectColumn ? 0 : selectable && params.onRowDragEnd ? 76 : 48;
|
|
3183
3184
|
const headerRowCount = columnDefs.some((c) => c.children) ? 2 : 1;
|
|
3184
3185
|
return (jsxRuntime.jsxs("div", { "data-testid": dataTestId, className: clsx('Grid-container', theme, 'theme-specific', staleGrid && 'Grid-sortIsStale', gridReady && rowData && autoSized && 'Grid-ready'), children: [gridContextMenu.component, jsxRuntime.jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsxRuntime.jsx(agGridReact.AgGridReact, { theme: 'legacy', rowSelection: selectable
|
|
3185
3186
|
? {
|
|
@@ -3191,9 +3192,10 @@ const Grid = ({ 'data-testid': dataTestId, defaultPostSort = true, rowSelection
|
|
|
3191
3192
|
event.api.forEachNode(() => rowCount++);
|
|
3192
3193
|
return (jsxRuntime.jsx(GridNoRowsOverlay, { loading: !rowData || params.loading === true, rowCount: rowCount, headerRowHeight: headerRowCount * rowHeight, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText, noRowsMatchingOverlayText: params.noRowsMatchingOverlayText }));
|
|
3193
3194
|
}, onModelUpdated: onModelUpdated, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: params.onRowDragEnd || !defaultPostSort ? undefined : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection, onColumnMoved: params.onColumnMoved, alwaysShowVerticalScroll: params.alwaysShowVerticalScroll, isExternalFilterPresent: isExternalFilterPresent, doesExternalFilterPass: doesExternalFilterPass, maintainColumnOrder: true, preventDefaultOnContextMenu: true, onCellContextMenu: gridContextMenu.cellContextMenu, rowDragText: params.rowDragText, onRowDragCancel: clearHighlightRowClasses, onRowDragMove: onRowDragMove, onRowDragEnd: onRowDragEnd, suppressCellFocus: params.suppressCellFocus, pinnedTopRowData: params.pinnedTopRowData, pinnedBottomRowData: params.pinnedBottomRowData, selectionColumnDef: {
|
|
3195
|
+
suppressNavigable: params.hideSelectColumn,
|
|
3194
3196
|
rowDrag: !!params.onRowDragEnd,
|
|
3195
|
-
minWidth:
|
|
3196
|
-
maxWidth:
|
|
3197
|
+
minWidth: selectWidth,
|
|
3198
|
+
maxWidth: selectWidth,
|
|
3197
3199
|
pinned: selectColumnPinned,
|
|
3198
3200
|
headerComponentParams: {
|
|
3199
3201
|
exportable: false,
|