@nokecy/qc-ui 0.3.6 → 0.3.7

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.
@@ -286,9 +286,11 @@ function AgGridPlus(props) {
286
286
  });
287
287
  }, []);
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
+
293
+ return !columnProps ? props.columnDefs ? props.columnDefs : [] : columnProps;
292
294
  }, []);
293
295
  var rowDataMemo = (0, _react.useMemo)(function () {
294
296
  return props.treeData ? (0, _utils.flatten)((0, _utils.toTree)(rowData), treeParentName) : rowData;
@@ -258,9 +258,10 @@ function AgGridPlus(props) {
258
258
  });
259
259
  }, []);
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
+ return !columnProps ? props.columnDefs ? props.columnDefs : [] : columnProps;
264
265
  }, []);
265
266
  var rowDataMemo = useMemo(function () {
266
267
  return props.treeData ? flatten(toTree(rowData), treeParentName) : rowData;