@nokecy/qc-ui 0.1.44 → 0.1.45

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.
@@ -173,9 +173,6 @@ function AgGridPlus(props) {
173
173
  (0, _react.useEffect)(function () {
174
174
  loadingProps !== undefined && setLoading(loadingProps);
175
175
  }, [loadingProps]);
176
- var gridRowData = (0, _react.useMemo)(function () {
177
- return props.treeData ? (0, _utils.flatten)((0, _utils.toTree)(rowData), treeParentName) : rowData;
178
- }, [props.treeData, treeParentName, rowData]);
179
176
  var onGridReady = (0, _react.useCallback)(function (params) {
180
177
  var _columnsRef$current;
181
178
 
@@ -291,7 +288,7 @@ function AgGridPlus(props) {
291
288
  }, rest, {
292
289
  //指定客户端模式
293
290
  rowModelType: "clientSide",
294
- rowData: gridRowData,
291
+ rowData: props.treeData ? (0, _utils.flatten)((0, _utils.toTree)(rowData), treeParentName) : rowData,
295
292
  onGridReady: onGridReady,
296
293
  defaultColDef: defaultColDef,
297
294
  onSortChanged: function onSortChanged(event) {
@@ -26,7 +26,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
26
26
 
27
27
  import { AgGridReact } from 'ag-grid-react';
28
28
  import { Spin, Pagination, Card, Tag } from 'antd';
29
- import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
29
+ import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
30
30
  import "ag-grid-enterprise";
31
31
  import "./global.scss";
32
32
  import "./index.less";
@@ -146,9 +146,6 @@ function AgGridPlus(props) {
146
146
  useEffect(function () {
147
147
  loadingProps !== undefined && setLoading(loadingProps);
148
148
  }, [loadingProps]);
149
- var gridRowData = useMemo(function () {
150
- return props.treeData ? flatten(toTree(rowData), treeParentName) : rowData;
151
- }, [props.treeData, treeParentName, rowData]);
152
149
  var onGridReady = useCallback(function (params) {
153
150
  var _columnsRef$current;
154
151
 
@@ -264,7 +261,7 @@ function AgGridPlus(props) {
264
261
  }, rest, {
265
262
  //指定客户端模式
266
263
  rowModelType: "clientSide",
267
- rowData: gridRowData,
264
+ rowData: props.treeData ? flatten(toTree(rowData), treeParentName) : rowData,
268
265
  onGridReady: onGridReady,
269
266
  defaultColDef: defaultColDef,
270
267
  onSortChanged: function onSortChanged(event) {