@linzjs/step-ag-grid 2.0.1 → 2.1.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/README.md +28 -10
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/src/components/Grid.d.ts +0 -1
- package/dist/step-ag-grid.esm.js +1 -2
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +10 -1
- package/src/components/Grid.tsx +1 -3
- package/src/stories/components/GridPopoutBearing.stories.tsx +2 -3
- package/src/stories/components/GridPopoutEditDropDown.stories.tsx +2 -4
- package/src/stories/components/GridPopoutEditGeneric.stories.tsx +2 -3
- package/src/stories/components/GridPopoutEditGenericTextArea.stories.tsx +2 -3
- package/src/stories/components/GridPopoutEditMultiSelect.stories.tsx +2 -3
- package/src/stories/components/GridReadOnly.stories.tsx +4 -5
package/package.json
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
"name": "@linzjs/step-ag-grid",
|
|
3
3
|
"repository": "github:linz/step-ag-grid.git",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.1.1",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"aggrid",
|
|
8
|
+
"ag-grid",
|
|
9
|
+
"react-menu",
|
|
10
|
+
"grid",
|
|
11
|
+
"table",
|
|
12
|
+
"react",
|
|
13
|
+
"react-component"
|
|
14
|
+
],
|
|
6
15
|
"main": "dist/index.js",
|
|
7
16
|
"typings": "dist/index.d.ts",
|
|
8
17
|
"module": "dist/step-ag-grid.esm.js",
|
package/src/components/Grid.tsx
CHANGED
|
@@ -24,7 +24,6 @@ export interface GridProps {
|
|
|
24
24
|
domLayout?: GridOptions["domLayout"];
|
|
25
25
|
externalSelectedItems?: any[];
|
|
26
26
|
setExternalSelectedItems?: (items: any[]) => void;
|
|
27
|
-
onGridReady?: GridOptions["onGridReady"];
|
|
28
27
|
defaultColDef?: GridOptions["defaultColDef"];
|
|
29
28
|
columnDefs: GridOptions["columnDefs"];
|
|
30
29
|
rowData: GridOptions["rowData"];
|
|
@@ -146,11 +145,10 @@ export const Grid = (params: GridProps): JSX.Element => {
|
|
|
146
145
|
const onGridReady = useCallback(
|
|
147
146
|
(event: GridReadyEvent) => {
|
|
148
147
|
setGridApi(event.api);
|
|
149
|
-
params.onGridReady && params.onGridReady(event);
|
|
150
148
|
synchroniseExternallySelectedItemsToGrid();
|
|
151
149
|
updateQuickFilter();
|
|
152
150
|
},
|
|
153
|
-
[
|
|
151
|
+
[setGridApi, synchroniseExternallySelectedItemsToGrid, updateQuickFilter],
|
|
154
152
|
);
|
|
155
153
|
|
|
156
154
|
const noRowsOverlayComponent = useCallback(
|
|
@@ -19,8 +19,8 @@ export default {
|
|
|
19
19
|
title: "Components / Grids",
|
|
20
20
|
component: Grid,
|
|
21
21
|
args: {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
quickFilterValue: "",
|
|
23
|
+
selectable: true,
|
|
24
24
|
},
|
|
25
25
|
decorators: [
|
|
26
26
|
(Story) => (
|
|
@@ -96,7 +96,6 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
96
96
|
return (
|
|
97
97
|
<Grid
|
|
98
98
|
{...props}
|
|
99
|
-
selectable={true}
|
|
100
99
|
externalSelectedItems={externalSelectedItems}
|
|
101
100
|
setExternalSelectedItems={setExternalSelectedItems}
|
|
102
101
|
columnDefs={columnDefs}
|
|
@@ -17,8 +17,8 @@ export default {
|
|
|
17
17
|
title: "Components / Grids",
|
|
18
18
|
component: Grid,
|
|
19
19
|
args: {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
quickFilterValue: "",
|
|
21
|
+
selectable: true,
|
|
22
22
|
},
|
|
23
23
|
decorators: [
|
|
24
24
|
(Story) => (
|
|
@@ -93,7 +93,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
93
93
|
{
|
|
94
94
|
multiEdit: false,
|
|
95
95
|
editorParams: {
|
|
96
|
-
className: "Xxx",
|
|
97
96
|
options: ["Architect", "Developer", "Product Owner", "Scrum Master", "Tester", MenuSeparator, "(other)"],
|
|
98
97
|
},
|
|
99
98
|
},
|
|
@@ -272,7 +271,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
272
271
|
return (
|
|
273
272
|
<Grid
|
|
274
273
|
{...props}
|
|
275
|
-
selectable={true}
|
|
276
274
|
externalSelectedItems={externalSelectedItems}
|
|
277
275
|
setExternalSelectedItems={setExternalSelectedItems}
|
|
278
276
|
columnDefs={columnDefs}
|
|
@@ -15,8 +15,8 @@ export default {
|
|
|
15
15
|
title: "Components / Grids",
|
|
16
16
|
component: Grid,
|
|
17
17
|
args: {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
quickFilterValue: "",
|
|
19
|
+
selectable: true,
|
|
20
20
|
},
|
|
21
21
|
decorators: [
|
|
22
22
|
(Story) => (
|
|
@@ -69,7 +69,6 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
|
|
|
69
69
|
return (
|
|
70
70
|
<Grid
|
|
71
71
|
{...props}
|
|
72
|
-
selectable={true}
|
|
73
72
|
externalSelectedItems={externalSelectedItems}
|
|
74
73
|
setExternalSelectedItems={setExternalSelectedItems}
|
|
75
74
|
columnDefs={columnDefs}
|
|
@@ -18,8 +18,8 @@ export default {
|
|
|
18
18
|
title: "Components / Grids",
|
|
19
19
|
component: Grid,
|
|
20
20
|
args: {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
quickFilterValue: "",
|
|
22
|
+
selectable: true,
|
|
23
23
|
},
|
|
24
24
|
decorators: [
|
|
25
25
|
(Story) => (
|
|
@@ -139,7 +139,6 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
|
|
|
139
139
|
return (
|
|
140
140
|
<Grid
|
|
141
141
|
{...props}
|
|
142
|
-
selectable={true}
|
|
143
142
|
externalSelectedItems={externalSelectedItems}
|
|
144
143
|
setExternalSelectedItems={setExternalSelectedItems}
|
|
145
144
|
columnDefs={columnDefs}
|
|
@@ -19,8 +19,8 @@ export default {
|
|
|
19
19
|
title: "Components / Grids",
|
|
20
20
|
component: Grid,
|
|
21
21
|
args: {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
quickFilterValue: "",
|
|
23
|
+
selectable: true,
|
|
24
24
|
},
|
|
25
25
|
decorators: [
|
|
26
26
|
(Story) => (
|
|
@@ -131,7 +131,6 @@ const GridEditMultiSelectTemplate: ComponentStory<typeof Grid> = (props: GridPro
|
|
|
131
131
|
return (
|
|
132
132
|
<Grid
|
|
133
133
|
{...props}
|
|
134
|
-
selectable={true}
|
|
135
134
|
externalSelectedItems={externalSelectedItems}
|
|
136
135
|
setExternalSelectedItems={setExternalSelectedItems}
|
|
137
136
|
columnDefs={columnDefs}
|
|
@@ -17,8 +17,10 @@ export default {
|
|
|
17
17
|
title: "Components / Grids",
|
|
18
18
|
component: Grid,
|
|
19
19
|
args: {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
quickFilter: true,
|
|
21
|
+
quickFilterValue: "",
|
|
22
|
+
quickFilterPlaceholder: "Quick filter...",
|
|
23
|
+
selectable: false,
|
|
22
24
|
},
|
|
23
25
|
decorators: [
|
|
24
26
|
(Story) => (
|
|
@@ -160,13 +162,10 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
160
162
|
return (
|
|
161
163
|
<Grid
|
|
162
164
|
{...props}
|
|
163
|
-
selectable={true}
|
|
164
165
|
externalSelectedItems={externalSelectedItems}
|
|
165
166
|
setExternalSelectedItems={setExternalSelectedItems}
|
|
166
167
|
columnDefs={columnDefs}
|
|
167
168
|
rowData={rowData}
|
|
168
|
-
quickFilter={true}
|
|
169
|
-
quickFilterPlaceholder={"Quick filter..."}
|
|
170
169
|
/>
|
|
171
170
|
);
|
|
172
171
|
};
|