@linzjs/step-ag-grid 21.0.4 → 21.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.
- package/README.md +1 -1
- package/dist/src/contexts/GridPopoverContext.d.ts +1 -0
- package/dist/step-ag-grid.cjs.js +3 -0
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +3 -0
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/contexts/GridPopoverContext.tsx +2 -0
- package/src/contexts/GridPopoverContextProvider.tsx +3 -0
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ export interface GridPopoverContextType<TData extends GridBaseRow> {
|
|
|
6
6
|
anchorRef: RefObject<Element>;
|
|
7
7
|
saving: boolean;
|
|
8
8
|
setSaving: (saving: boolean) => void;
|
|
9
|
+
colId: string;
|
|
9
10
|
field: keyof TData;
|
|
10
11
|
value: any;
|
|
11
12
|
data: TData;
|
|
@@ -18,6 +19,7 @@ export const GridPopoverContext = createContext<GridPopoverContextType<any>>({
|
|
|
18
19
|
anchorRef: { current: null },
|
|
19
20
|
saving: false,
|
|
20
21
|
setSaving: () => {},
|
|
22
|
+
colId: "",
|
|
21
23
|
field: "",
|
|
22
24
|
value: null,
|
|
23
25
|
data: {} as GridBaseRow,
|
|
@@ -26,7 +26,9 @@ export const GridPopoverContextProvider = ({ props, children }: PropsWithChildre
|
|
|
26
26
|
multiEdit ? sortBy(getFilteredSelectedRows(), (row) => row.id !== props.data.id) : [props.data as GridBaseRow],
|
|
27
27
|
[getFilteredSelectedRows, multiEdit, props.data],
|
|
28
28
|
);
|
|
29
|
+
|
|
29
30
|
const field = props.colDef?.field ?? "";
|
|
31
|
+
const colId = props.colDef?.colId ?? field ?? "";
|
|
30
32
|
|
|
31
33
|
const updateValue = useCallback(
|
|
32
34
|
async (saveFn: (selectedRows: any[]) => Promise<boolean>, tabDirection: 1 | 0 | -1): Promise<boolean> => {
|
|
@@ -44,6 +46,7 @@ export const GridPopoverContextProvider = ({ props, children }: PropsWithChildre
|
|
|
44
46
|
saving,
|
|
45
47
|
setSaving,
|
|
46
48
|
selectedRows,
|
|
49
|
+
colId,
|
|
47
50
|
field,
|
|
48
51
|
data: props.data,
|
|
49
52
|
value: props.value,
|