@majoo-ui/react 1.60.14-rc.5 → 1.60.15-rc.1

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.
@@ -1213,6 +1213,7 @@ export interface RowGroup {
1213
1213
  headerRender?: (row: Row<object>, cell: CellProp) => React.ReactNode;
1214
1214
  footerRender?: (row: Row<object>, cell: CellProp) => React.ReactNode;
1215
1215
  showGroupingWhenSorted?: boolean;
1216
+ isManuallyFormatted?: boolean;
1216
1217
  }
1217
1218
  interface CustomRowsStyle {
1218
1219
  predicate: boolean;
package/index.esm.js CHANGED
@@ -23043,8 +23043,11 @@ const stickyShadowStyling = (column, tableScrollPosition, scrollAreaWidth) => {
23043
23043
  }
23044
23044
  return {};
23045
23045
  };
23046
- const formattingData = (rawData, groupKey) => {
23047
- if (groupKey) {
23046
+ const formattingData = (rawData, rowGroup) => {
23047
+ if ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.groupKey) && !(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.isManuallyFormatted)) {
23048
+ const {
23049
+ groupKey
23050
+ } = rowGroup;
23048
23051
  const modifiedData = [];
23049
23052
  rawData.forEach((item, index) => {
23050
23053
  if (item[groupKey] && item[groupKey].length > 0) {
@@ -23298,7 +23301,7 @@ function Table({
23298
23301
  };
23299
23302
  const instance = useTable({
23300
23303
  columns,
23301
- data: useMemo(() => formattingData(rawData, rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.groupKey), [rawData, rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.groupKey]),
23304
+ data: useMemo(() => formattingData(rawData, rowGroup), [rawData, rowGroup]),
23302
23305
  initialState: getInitialState(),
23303
23306
  manualPagination: !!fetchData,
23304
23307
  manualSortBy: !!fetchData,
package/index.umd.js CHANGED
@@ -23392,16 +23392,17 @@
23392
23392
  }
23393
23393
  return {};
23394
23394
  };
23395
- var formattingData = function formattingData(rawData, groupKey) {
23396
- if (groupKey) {
23395
+ var formattingData = function formattingData(rawData, rowGroup) {
23396
+ if ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.groupKey) && !(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.isManuallyFormatted)) {
23397
+ var groupKey_1 = rowGroup.groupKey;
23397
23398
  var modifiedData_1 = [];
23398
23399
  rawData.forEach(function (item, index) {
23399
- if (item[groupKey] && item[groupKey].length > 0) {
23400
- var newElement = item[groupKey].map(function (childItem, index) {
23400
+ if (item[groupKey_1] && item[groupKey_1].length > 0) {
23401
+ var newElement = item[groupKey_1].map(function (childItem, index) {
23401
23402
  return __assign(__assign({}, childItem), {
23402
23403
  isTopChild: index === 0,
23403
23404
  parentOriginal: item,
23404
- isBottomChild: index === item[groupKey].length - 1
23405
+ isBottomChild: index === item[groupKey_1].length - 1
23405
23406
  });
23406
23407
  });
23407
23408
  modifiedData_1.push.apply(modifiedData_1, newElement);
@@ -23700,8 +23701,8 @@
23700
23701
  var instance = reactTable.useTable({
23701
23702
  columns: columns,
23702
23703
  data: React.useMemo(function () {
23703
- return formattingData(rawData, rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.groupKey);
23704
- }, [rawData, rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.groupKey]),
23704
+ return formattingData(rawData, rowGroup);
23705
+ }, [rawData, rowGroup]),
23705
23706
  initialState: getInitialState(),
23706
23707
  manualPagination: !!fetchData,
23707
23708
  manualSortBy: !!fetchData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.60.14-rc.5",
3
+ "version": "1.60.15-rc.1",
4
4
  "dependencies": {
5
5
  "@majoo-ui/core": "^1.31.3",
6
6
  "@majoo-ui/helpers": "^1.30.5",