@nokecy/qc-ui 1.0.31 → 1.0.33
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.
|
@@ -240,7 +240,6 @@ function AgGridPlus(props) {
|
|
|
240
240
|
}
|
|
241
241
|
return cellMap;
|
|
242
242
|
};
|
|
243
|
-
var groupRowRenderer = (0, _react.useCallback)(_customGroupCellRenderer.default, []);
|
|
244
243
|
var sortChanged = function sortChanged(columnApi) {
|
|
245
244
|
var sortedColumn = columnApi.getColumnState().find(function (col) {
|
|
246
245
|
return Boolean(col.sort);
|
|
@@ -471,6 +470,11 @@ function AgGridPlus(props) {
|
|
|
471
470
|
return props.treeData ? (0, _utils.flatten)((0, _utils.toTree)(rowData, treeKeyName !== null && treeKeyName !== void 0 ? treeKeyName : "id", treeParentName !== null && treeParentName !== void 0 ? treeParentName : "parentId"), treeKeyName !== null && treeKeyName !== void 0 ? treeKeyName : "id") : rowData;
|
|
472
471
|
}, [rowData, props.treeData]);
|
|
473
472
|
var actionDom = toolBarRender && toolBarRender(apiRef.current, (0, _utils.convertFilterModel)(queryFilter, allColDefs), queryFilter);
|
|
473
|
+
var autoGroupColumnDef = (0, _react.useMemo)(function () {
|
|
474
|
+
return _objectSpread(_objectSpread({}, props.autoGroupColumnDef), {}, {
|
|
475
|
+
cellRenderer: _customGroupCellRenderer.default
|
|
476
|
+
});
|
|
477
|
+
}, []);
|
|
474
478
|
return /*#__PURE__*/_react.default.createElement(_antd.Spin, {
|
|
475
479
|
spinning: loading,
|
|
476
480
|
wrapperClassName: "grid-spin"
|
|
@@ -542,8 +546,7 @@ function AgGridPlus(props) {
|
|
|
542
546
|
overlayNoRowsTemplate: "<span style=\"\n display: flex; \n justify-content: center; \n align-items: center; \n height: 100%; \n font-size: 14px; \n color: #aaa; \n line-height: 1.5;\n text-align: center;\">\n ".concat(overlayNoRowsTemplateText || '没有找到数据,试试调整筛选条件吧!', "\n </span>"),
|
|
543
547
|
enableRangeSelection: true,
|
|
544
548
|
suppressCopyRowsToClipboard: true,
|
|
545
|
-
|
|
546
|
-
groupDisplayType: "groupRows"
|
|
549
|
+
autoGroupColumnDef: autoGroupColumnDef
|
|
547
550
|
//指定客户端模式
|
|
548
551
|
,
|
|
549
552
|
rowModelType: "clientSide",
|
|
@@ -175,7 +175,13 @@ var FormRender = function FormRender(props) {
|
|
|
175
175
|
(0, _react2.useEffect)(function () {
|
|
176
176
|
var new_schema = getSchema(onReset);
|
|
177
177
|
setSchema(new_schema);
|
|
178
|
-
}, [
|
|
178
|
+
}, [columnStates === null || columnStates === void 0 ? void 0 : columnStates.map(function (c) {
|
|
179
|
+
return c.colId;
|
|
180
|
+
}).join('|'), // 列ID变化监听
|
|
181
|
+
colDefs === null || colDefs === void 0 ? void 0 : colDefs.map(function (c) {
|
|
182
|
+
return "".concat(c.field, "|").concat(c.headerName);
|
|
183
|
+
}).join('|') // 同时监听字段名和显示名称
|
|
184
|
+
]);
|
|
179
185
|
return /*#__PURE__*/_react2.default.createElement("div", {
|
|
180
186
|
className: (0, _classnames.default)(className, "ag-grid-table-search ag-grid-table-search-query-filter")
|
|
181
187
|
}, /*#__PURE__*/_react2.default.createElement(_antdV.Form, {
|
|
@@ -231,7 +231,6 @@ function AgGridPlus(props) {
|
|
|
231
231
|
}
|
|
232
232
|
return cellMap;
|
|
233
233
|
};
|
|
234
|
-
var groupRowRenderer = useCallback(CustomGroupCellRenderer, []);
|
|
235
234
|
var sortChanged = function sortChanged(columnApi) {
|
|
236
235
|
var sortedColumn = columnApi.getColumnState().find(function (col) {
|
|
237
236
|
return Boolean(col.sort);
|
|
@@ -462,6 +461,11 @@ function AgGridPlus(props) {
|
|
|
462
461
|
return props.treeData ? flatten(toTree(rowData, treeKeyName !== null && treeKeyName !== void 0 ? treeKeyName : "id", treeParentName !== null && treeParentName !== void 0 ? treeParentName : "parentId"), treeKeyName !== null && treeKeyName !== void 0 ? treeKeyName : "id") : rowData;
|
|
463
462
|
}, [rowData, props.treeData]);
|
|
464
463
|
var actionDom = toolBarRender && toolBarRender(apiRef.current, convertFilterModel(queryFilter, allColDefs), queryFilter);
|
|
464
|
+
var autoGroupColumnDef = useMemo(function () {
|
|
465
|
+
return _objectSpread(_objectSpread({}, props.autoGroupColumnDef), {}, {
|
|
466
|
+
cellRenderer: CustomGroupCellRenderer
|
|
467
|
+
});
|
|
468
|
+
}, []);
|
|
465
469
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
466
470
|
spinning: loading,
|
|
467
471
|
wrapperClassName: "grid-spin"
|
|
@@ -533,8 +537,7 @@ function AgGridPlus(props) {
|
|
|
533
537
|
overlayNoRowsTemplate: "<span style=\"\n display: flex; \n justify-content: center; \n align-items: center; \n height: 100%; \n font-size: 14px; \n color: #aaa; \n line-height: 1.5;\n text-align: center;\">\n ".concat(overlayNoRowsTemplateText || '没有找到数据,试试调整筛选条件吧!', "\n </span>"),
|
|
534
538
|
enableRangeSelection: true,
|
|
535
539
|
suppressCopyRowsToClipboard: true,
|
|
536
|
-
|
|
537
|
-
groupDisplayType: "groupRows"
|
|
540
|
+
autoGroupColumnDef: autoGroupColumnDef
|
|
538
541
|
//指定客户端模式
|
|
539
542
|
,
|
|
540
543
|
rowModelType: "clientSide",
|
|
@@ -167,7 +167,13 @@ var FormRender = function FormRender(props) {
|
|
|
167
167
|
useEffect(function () {
|
|
168
168
|
var new_schema = getSchema(onReset);
|
|
169
169
|
setSchema(new_schema);
|
|
170
|
-
}, [
|
|
170
|
+
}, [columnStates === null || columnStates === void 0 ? void 0 : columnStates.map(function (c) {
|
|
171
|
+
return c.colId;
|
|
172
|
+
}).join('|'), // 列ID变化监听
|
|
173
|
+
colDefs === null || colDefs === void 0 ? void 0 : colDefs.map(function (c) {
|
|
174
|
+
return "".concat(c.field, "|").concat(c.headerName);
|
|
175
|
+
}).join('|') // 同时监听字段名和显示名称
|
|
176
|
+
]);
|
|
171
177
|
return /*#__PURE__*/React.createElement("div", {
|
|
172
178
|
className: classNames(className, "ag-grid-table-search ag-grid-table-search-query-filter")
|
|
173
179
|
}, /*#__PURE__*/React.createElement(Form, {
|