@infinite-table/infinite-react 6.2.8 → 6.2.10

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.
package/index.dev.js CHANGED
@@ -9409,7 +9409,10 @@ function getRawValueForCell(column, rowInfo) {
9409
9409
  const groupBy = dataSourceHasGrouping ? rowInfo.groupBy : void 0;
9410
9410
  let value = isGroupRow && groupBy && column.groupByForColumn && // if this is a multi-group column we're good
9411
9411
  (Array.isArray(column.groupByForColumn) || // or it has to be a group column for the current group row
9412
- column.groupByForColumn === groupBy[groupBy.length - 1]) ? rowInfo.value : isColumnWithField(column) ? data?.[column.field] : null;
9412
+ column.groupByForColumn === groupBy[groupBy.length - 1]) ? rowInfo.value : isColumnWithField(column) ? (
9413
+ // @ts-ignore
9414
+ data?.[column.field]
9415
+ ) : null;
9413
9416
  if (column.field && rowInfo.isGroupRow && rowInfo.reducerData && rowInfo.reducerData[column.field] != null) {
9414
9417
  value = rowInfo.reducerData[column.field];
9415
9418
  }
@@ -12671,7 +12674,10 @@ function flattenTreeNodes(dataArray, parentPath, parents, indexInParentNodes, pa
12671
12674
  expanded = false;
12672
12675
  }
12673
12676
  rowInfo.nodeExpanded = expanded;
12674
- if (expanded && parentExpanded && repeatWrappedGroupRows && rowsPerPage != null && rowsPerPage > 0) {
12677
+ if (
12678
+ // expanded &&
12679
+ parentExpanded && repeatWrappedGroupRows && rowsPerPage != null && rowsPerPage > 0
12680
+ ) {
12675
12681
  const indexInAll = rowInfo.indexInAll;
12676
12682
  const currentParents = rowInfo.parentNodes;
12677
12683
  if (currentParents.length > 0 && indexInAll % rowsPerPage === 0) {
@@ -23597,7 +23603,7 @@ var useLicense = (licenseKey = "") => {
23597
23603
  }
23598
23604
  let valid2 = isValidLicense(licenseKey, {
23599
23605
  publishedAt: 1624970570587,
23600
- version: "6.2.8"
23606
+ version: "6.2.10"
23601
23607
  });
23602
23608
  if (!licenseKey && !valid2 && isInsidePlayground) {
23603
23609
  return true;
@@ -27109,9 +27115,17 @@ var import_react65 = require("react");
27109
27115
  function useHorizontalLayout() {
27110
27116
  const { getState, actions, dataSourceActions, getDataSourceState } = useInfiniteTable();
27111
27117
  const { groupBy, isTree } = getDataSourceState();
27112
- const { brain, wrapRowsHorizontally, repeatWrappedGroupRows } = getState();
27118
+ const state = getState();
27119
+ const { brain, wrapRowsHorizontally } = state;
27120
+ let repeatWrappedGroupRows = state.repeatWrappedGroupRows;
27121
+ if (!wrapRowsHorizontally) {
27122
+ repeatWrappedGroupRows = false;
27123
+ }
27113
27124
  (0, import_react65.useEffect)(() => {
27114
27125
  if (!wrapRowsHorizontally) {
27126
+ if (getDataSourceState().repeatWrappedGroupRows) {
27127
+ dataSourceActions.repeatWrappedGroupRows = false;
27128
+ }
27115
27129
  return;
27116
27130
  }
27117
27131
  const onVerticalRenderRangeChange = () => {
package/index.dev.mjs CHANGED
@@ -9358,7 +9358,10 @@ function getRawValueForCell(column, rowInfo) {
9358
9358
  const groupBy = dataSourceHasGrouping ? rowInfo.groupBy : void 0;
9359
9359
  let value = isGroupRow && groupBy && column.groupByForColumn && // if this is a multi-group column we're good
9360
9360
  (Array.isArray(column.groupByForColumn) || // or it has to be a group column for the current group row
9361
- column.groupByForColumn === groupBy[groupBy.length - 1]) ? rowInfo.value : isColumnWithField(column) ? data?.[column.field] : null;
9361
+ column.groupByForColumn === groupBy[groupBy.length - 1]) ? rowInfo.value : isColumnWithField(column) ? (
9362
+ // @ts-ignore
9363
+ data?.[column.field]
9364
+ ) : null;
9362
9365
  if (column.field && rowInfo.isGroupRow && rowInfo.reducerData && rowInfo.reducerData[column.field] != null) {
9363
9366
  value = rowInfo.reducerData[column.field];
9364
9367
  }
@@ -12620,7 +12623,10 @@ function flattenTreeNodes(dataArray, parentPath, parents, indexInParentNodes, pa
12620
12623
  expanded = false;
12621
12624
  }
12622
12625
  rowInfo.nodeExpanded = expanded;
12623
- if (expanded && parentExpanded && repeatWrappedGroupRows && rowsPerPage != null && rowsPerPage > 0) {
12626
+ if (
12627
+ // expanded &&
12628
+ parentExpanded && repeatWrappedGroupRows && rowsPerPage != null && rowsPerPage > 0
12629
+ ) {
12624
12630
  const indexInAll = rowInfo.indexInAll;
12625
12631
  const currentParents = rowInfo.parentNodes;
12626
12632
  if (currentParents.length > 0 && indexInAll % rowsPerPage === 0) {
@@ -23555,7 +23561,7 @@ var useLicense = (licenseKey = "") => {
23555
23561
  }
23556
23562
  let valid2 = isValidLicense(licenseKey, {
23557
23563
  publishedAt: 1624970570587,
23558
- version: "6.2.8"
23564
+ version: "6.2.10"
23559
23565
  });
23560
23566
  if (!licenseKey && !valid2 && isInsidePlayground) {
23561
23567
  return true;
@@ -27077,9 +27083,17 @@ import { useEffect as useEffect37 } from "react";
27077
27083
  function useHorizontalLayout() {
27078
27084
  const { getState, actions, dataSourceActions, getDataSourceState } = useInfiniteTable();
27079
27085
  const { groupBy, isTree } = getDataSourceState();
27080
- const { brain, wrapRowsHorizontally, repeatWrappedGroupRows } = getState();
27086
+ const state = getState();
27087
+ const { brain, wrapRowsHorizontally } = state;
27088
+ let repeatWrappedGroupRows = state.repeatWrappedGroupRows;
27089
+ if (!wrapRowsHorizontally) {
27090
+ repeatWrappedGroupRows = false;
27091
+ }
27081
27092
  useEffect37(() => {
27082
27093
  if (!wrapRowsHorizontally) {
27094
+ if (getDataSourceState().repeatWrappedGroupRows) {
27095
+ dataSourceActions.repeatWrappedGroupRows = false;
27096
+ }
27083
27097
  return;
27084
27098
  }
27085
27099
  const onVerticalRenderRangeChange = () => {