@nokecy/qc-ui 0.1.20 → 0.1.22
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.
|
@@ -60,6 +60,18 @@ var FormRender = function FormRender(props) {
|
|
|
60
60
|
gridApi = props.gridApi,
|
|
61
61
|
columnStates = props.columnStates,
|
|
62
62
|
onQuery = props.onQuery;
|
|
63
|
+
|
|
64
|
+
var getFormComponents = function getFormComponents() {
|
|
65
|
+
var columnDefs = gridApi === null || gridApi === void 0 ? void 0 : gridApi.getColumnDefs();
|
|
66
|
+
var components = {};
|
|
67
|
+
|
|
68
|
+
if (columnDefs) {
|
|
69
|
+
return columnDefs.map(function (x) {
|
|
70
|
+
return x.searchComponent;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
63
75
|
var form = (0, _react2.useMemo)(function () {
|
|
64
76
|
return (0, _core.createForm)();
|
|
65
77
|
}, []);
|
|
@@ -119,7 +131,9 @@ var FormRender = function FormRender(props) {
|
|
|
119
131
|
var getComponent = function getComponent(colDef) {
|
|
120
132
|
var component = colDef.searchComponent ? colDef.searchComponent : undefined;
|
|
121
133
|
|
|
122
|
-
if (
|
|
134
|
+
if (component) {
|
|
135
|
+
return component;
|
|
136
|
+
} else {
|
|
123
137
|
switch (colDef.filter) {
|
|
124
138
|
case "agDateColumnFilter":
|
|
125
139
|
component = "DatePicker.RangePicker";
|
|
@@ -185,7 +199,10 @@ var FormRender = function FormRender(props) {
|
|
|
185
199
|
maxWidth: 200
|
|
186
200
|
}
|
|
187
201
|
}, colDef === null || colDef === void 0 ? void 0 : colDef.searchComponentProps),
|
|
188
|
-
"x-decorator": 'FormItem'
|
|
202
|
+
"x-decorator": 'FormItem',
|
|
203
|
+
"x-decorator-props": {
|
|
204
|
+
wrapperWrap: true
|
|
205
|
+
}
|
|
189
206
|
}; ///@ts-ignore
|
|
190
207
|
|
|
191
208
|
gridSchema.properties[name] = filedSchema;
|
|
@@ -39,6 +39,18 @@ var FormRender = function FormRender(props) {
|
|
|
39
39
|
gridApi = props.gridApi,
|
|
40
40
|
columnStates = props.columnStates,
|
|
41
41
|
onQuery = props.onQuery;
|
|
42
|
+
|
|
43
|
+
var getFormComponents = function getFormComponents() {
|
|
44
|
+
var columnDefs = gridApi === null || gridApi === void 0 ? void 0 : gridApi.getColumnDefs();
|
|
45
|
+
var components = {};
|
|
46
|
+
|
|
47
|
+
if (columnDefs) {
|
|
48
|
+
return columnDefs.map(function (x) {
|
|
49
|
+
return x.searchComponent;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
42
54
|
var form = useMemo(function () {
|
|
43
55
|
return createForm();
|
|
44
56
|
}, []);
|
|
@@ -98,7 +110,9 @@ var FormRender = function FormRender(props) {
|
|
|
98
110
|
var getComponent = function getComponent(colDef) {
|
|
99
111
|
var component = colDef.searchComponent ? colDef.searchComponent : undefined;
|
|
100
112
|
|
|
101
|
-
if (
|
|
113
|
+
if (component) {
|
|
114
|
+
return component;
|
|
115
|
+
} else {
|
|
102
116
|
switch (colDef.filter) {
|
|
103
117
|
case "agDateColumnFilter":
|
|
104
118
|
component = "DatePicker.RangePicker";
|
|
@@ -164,7 +178,10 @@ var FormRender = function FormRender(props) {
|
|
|
164
178
|
maxWidth: 200
|
|
165
179
|
}
|
|
166
180
|
}, colDef === null || colDef === void 0 ? void 0 : colDef.searchComponentProps),
|
|
167
|
-
"x-decorator": 'FormItem'
|
|
181
|
+
"x-decorator": 'FormItem',
|
|
182
|
+
"x-decorator-props": {
|
|
183
|
+
wrapperWrap: true
|
|
184
|
+
}
|
|
168
185
|
}; ///@ts-ignore
|
|
169
186
|
|
|
170
187
|
gridSchema.properties[name] = filedSchema;
|