@nokecy/qc-ui 1.0.32 → 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: props.treeData ? "groupRows" : "custom"
|
|
549
|
+
autoGroupColumnDef: autoGroupColumnDef
|
|
547
550
|
//指定客户端模式
|
|
548
551
|
,
|
|
549
552
|
rowModelType: "clientSide",
|
|
@@ -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: props.treeData ? "groupRows" : "custom"
|
|
540
|
+
autoGroupColumnDef: autoGroupColumnDef
|
|
538
541
|
//指定客户端模式
|
|
539
542
|
,
|
|
540
543
|
rowModelType: "clientSide",
|