@linzjs/step-ag-grid 14.9.4 → 15.0.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.
- package/README.md +5 -0
- package/dist/src/components/GridCellFiller.d.ts +4 -0
- package/dist/src/components/gridUtil.d.ts +3 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/contexts/GridContext.d.ts +2 -1
- package/dist/step-ag-grid.cjs.js +27801 -0
- package/dist/step-ag-grid.cjs.js.map +1 -0
- package/dist/step-ag-grid.esm.js +60 -42
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/GridCellFiller.tsx +11 -0
- package/src/components/gridFilter/GridFilterColumnsToggle.tsx +43 -53
- package/src/components/gridUtil.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/contexts/GridContext.tsx +8 -1
- package/src/contexts/GridContextProvider.tsx +53 -31
- package/src/stories/grid/GridReadOnly.stories.tsx +2 -0
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@ import "@linzjs/lui/dist/scss/base.scss";
|
|
|
53
53
|
import {
|
|
54
54
|
ColDefT,
|
|
55
55
|
GridCell,
|
|
56
|
+
GridCellFiller,
|
|
56
57
|
GridContextProvider,
|
|
57
58
|
GridPopoverEditDropDown,
|
|
58
59
|
GridPopoverMessage,
|
|
@@ -81,9 +82,11 @@ const GridDemo = () => {
|
|
|
81
82
|
headerName: "Id",
|
|
82
83
|
export: false,
|
|
83
84
|
}),
|
|
85
|
+
// This is the flex column that will expand to fit
|
|
84
86
|
GridCell({
|
|
85
87
|
field: "name",
|
|
86
88
|
headerName: "Name",
|
|
89
|
+
flex: 1,
|
|
87
90
|
cellRendererParams: {
|
|
88
91
|
warning: ({ value }) => value === "Tester" && "Testers are testing",
|
|
89
92
|
info: ({ value }) => value === "Developer" && "Developers are awesome",
|
|
@@ -115,6 +118,8 @@ const GridDemo = () => {
|
|
|
115
118
|
},
|
|
116
119
|
},
|
|
117
120
|
),
|
|
121
|
+
// If your flex column gets hidden this will become active
|
|
122
|
+
GridCellFiller(),
|
|
118
123
|
],
|
|
119
124
|
[],
|
|
120
125
|
);
|
|
@@ -14,7 +14,8 @@ export type AutoSizeColumnsResult = {
|
|
|
14
14
|
export interface GridContextType<RowType extends GridBaseRow> {
|
|
15
15
|
gridReady: boolean;
|
|
16
16
|
getColDef: (colId?: string) => ColDef | undefined;
|
|
17
|
-
getColumns: () => ColDefT<RowType>[];
|
|
17
|
+
getColumns: (filter?: keyof ColDef | ((r: ColDef) => boolean | undefined | null | number | string)) => ColDefT<RowType>[];
|
|
18
|
+
getColumnIds: (filter?: keyof ColDef | ((r: ColDef) => boolean | undefined | null | number | string)) => string[];
|
|
18
19
|
setApis: (gridApi: GridApi | undefined, columnApi: ColumnApi | undefined, dataTestId?: string) => void;
|
|
19
20
|
prePopupOps: () => void;
|
|
20
21
|
setQuickFilter: (quickFilter: string) => void;
|