@linzjs/step-ag-grid 2.1.0 → 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
CHANGED
|
@@ -49,16 +49,20 @@ import "@linzjs/step-ag-grid/dist/index.css"
|
|
|
49
49
|
import "@linzjs/step-ag-grid/dist/GridTheme.scss";
|
|
50
50
|
|
|
51
51
|
import { useMemo } from "react";
|
|
52
|
-
import {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
import {
|
|
53
|
+
GridUpdatingContextProvider,
|
|
54
|
+
GridContextProvider,
|
|
55
|
+
ColDefT,
|
|
56
|
+
GridCell,
|
|
57
|
+
GridPopoverMessage,
|
|
58
|
+
GridPopoverEditDropDown
|
|
59
|
+
} from "@linzjs/step-ag-grid";
|
|
56
60
|
|
|
57
61
|
const GridDemo = () => {
|
|
58
62
|
interface ITestRow {
|
|
59
63
|
id: number;
|
|
64
|
+
name: number;
|
|
60
65
|
position: string;
|
|
61
|
-
age: number;
|
|
62
66
|
};
|
|
63
67
|
|
|
64
68
|
const columnDefs: ColDefT<ITestRow>[] = useMemo(() => [
|
|
@@ -69,8 +73,8 @@ const GridDemo = () => {
|
|
|
69
73
|
maxWidth: 85,
|
|
70
74
|
}),
|
|
71
75
|
GridCell({
|
|
72
|
-
field: "
|
|
73
|
-
headerName: "
|
|
76
|
+
field: "name",
|
|
77
|
+
headerName: "Name",
|
|
74
78
|
initialWidth: 65,
|
|
75
79
|
maxWidth: 150,
|
|
76
80
|
cellRendererParams: {
|
|
@@ -78,6 +82,20 @@ const GridDemo = () => {
|
|
|
78
82
|
info: (props) => props.value === "Developer" && "Developers are awesome",
|
|
79
83
|
},
|
|
80
84
|
}),
|
|
85
|
+
GridPopoverEditDropDown(
|
|
86
|
+
{
|
|
87
|
+
field: "position",
|
|
88
|
+
initialWidth: 65,
|
|
89
|
+
maxWidth: 150,
|
|
90
|
+
headerName: "Position",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
multiEdit: false,
|
|
94
|
+
editorParams: {
|
|
95
|
+
options: ["Architect", "Developer", "Product Owner", "Scrum Master", "Tester", MenuSeparator, "(other)"],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
),
|
|
81
99
|
GridPopoverMessage(
|
|
82
100
|
{
|
|
83
101
|
headerName: "Popout message",
|
|
@@ -86,7 +104,7 @@ const GridDemo = () => {
|
|
|
86
104
|
{
|
|
87
105
|
multiEdit: true,
|
|
88
106
|
editorParams: {
|
|
89
|
-
message: async (formParams)
|
|
107
|
+
message: async (formParams) => {
|
|
90
108
|
return `There are ${formParams.selectedRows.length} row(s) selected`;
|
|
91
109
|
},
|
|
92
110
|
},
|
|
@@ -98,8 +116,8 @@ const GridDemo = () => {
|
|
|
98
116
|
|
|
99
117
|
const rowData: ITestRow[] = useMemo(
|
|
100
118
|
() => [
|
|
101
|
-
{ id: 1000,
|
|
102
|
-
{ id: 1001,
|
|
119
|
+
{ id: 1000, name: "Tom", position: "Tester" },
|
|
120
|
+
{ id: 1001, name: "Sue", position: "Developer" },
|
|
103
121
|
],
|
|
104
122
|
[],
|
|
105
123
|
);
|
package/package.json
CHANGED
|
@@ -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
|
},
|