@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 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
  );
@@ -0,0 +1,4 @@
1
+ import { ColDef } from "ag-grid-community";
2
+ export declare const GridCellFillerColId = "gridCellFiller";
3
+ export declare const isGridCellFiller: (col: ColDef) => boolean;
4
+ export declare const GridCellFiller: () => ColDef;
@@ -0,0 +1,3 @@
1
+ import { ColDef } from "ag-grid-community";
2
+ export declare const getColId: (colDef: ColDef) => string;
3
+ export declare const isFlexColumn: (colDef: ColDef) => boolean;
@@ -1,6 +1,7 @@
1
1
  export * from "./ComponentLoadingWrapper";
2
2
  export * from "./Grid";
3
3
  export * from "./GridCell";
4
+ export * from "./GridCellFiller";
4
5
  export * from "./GridCellMultiEditor";
5
6
  export * from "./GridCellMultiSelectClassRules";
6
7
  export * from "./gridFilter";
@@ -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;