@nokecy/qc-ui 0.3.6 → 0.3.8

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.
@@ -284,12 +284,14 @@ function AgGridPlus(props) {
284
284
  return !columnProps ? props.columnDefs ? props.columnDefs : [] : columnProps === null || columnProps === void 0 ? void 0 : columnProps.filter(function (x) {
285
285
  return !x.hideInTable;
286
286
  });
287
- }, []);
287
+ }, [children, props.columnDefs]);
288
288
  var allColDefs = (0, _react.useMemo)(function () {
289
- return _react.default.Children.map(children, function (child, index) {
289
+ var columnProps = _react.default.Children.map(children, function (child, index) {
290
290
  return child.props;
291
291
  });
292
- }, []);
292
+
293
+ return !columnProps ? props.columnDefs ? props.columnDefs : [] : columnProps;
294
+ }, [children, props.columnDefs]);
293
295
  var rowDataMemo = (0, _react.useMemo)(function () {
294
296
  return props.treeData ? (0, _utils.flatten)((0, _utils.toTree)(rowData), treeParentName) : rowData;
295
297
  }, [rowData, props.treeData]);
@@ -256,12 +256,13 @@ function AgGridPlus(props) {
256
256
  return !columnProps ? props.columnDefs ? props.columnDefs : [] : columnProps === null || columnProps === void 0 ? void 0 : columnProps.filter(function (x) {
257
257
  return !x.hideInTable;
258
258
  });
259
- }, []);
259
+ }, [children, props.columnDefs]);
260
260
  var allColDefs = useMemo(function () {
261
- return React.Children.map(children, function (child, index) {
261
+ var columnProps = React.Children.map(children, function (child, index) {
262
262
  return child.props;
263
263
  });
264
- }, []);
264
+ return !columnProps ? props.columnDefs ? props.columnDefs : [] : columnProps;
265
+ }, [children, props.columnDefs]);
265
266
  var rowDataMemo = useMemo(function () {
266
267
  return props.treeData ? flatten(toTree(rowData), treeParentName) : rowData;
267
268
  }, [rowData, props.treeData]);