@infinite-table/infinite-react 9.0.1 → 9.0.2

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
@@ -6516,9 +6516,12 @@ function getGroupByColumnReference(options) {
6516
6516
  if (column.groupByForColumn) {
6517
6517
  if (rowInfo.isGroupRow) {
6518
6518
  const rowGroupBy = rowInfo.groupBy[rowInfo.groupBy.length - 1];
6519
- groupByColumn = rowGroupBy ? fieldsToColumn.get(
6520
- rowGroupBy.field || rowGroupBy.groupField
6521
- ) : void 0;
6519
+ const isThisColumnGroupLevel = Array.isArray(column.groupByForColumn) || column.groupByForColumn === rowGroupBy;
6520
+ if (isThisColumnGroupLevel) {
6521
+ groupByColumn = rowGroupBy ? fieldsToColumn.get(
6522
+ rowGroupBy.field || rowGroupBy.groupField
6523
+ ) : void 0;
6524
+ }
6522
6525
  }
6523
6526
  if (!groupByColumn && column.field) {
6524
6527
  groupByColumn = fieldsToColumn.get(column.field);
@@ -26331,17 +26334,19 @@ function getGroupColumnRender({
26331
26334
  const { rowInfo, renderBag, column, align: align2 } = renderOptions;
26332
26335
  let { value: valueToRender, groupIcon, selectionCheckBox } = renderBag;
26333
26336
  const groupRowInfo = rowInfo;
26337
+ const isNestedGroupRow = groupRenderStrategy === "multi-column" && groupRowInfo.isGroupRow && groupIndexForColumn + 1 !== groupRowInfo.groupNesting;
26334
26338
  const className = join(
26335
26339
  display.flex,
26336
26340
  column.align === "end" ? flexFlow.rowReverse : flexFlow.row,
26337
26341
  alignItems.center,
26338
26342
  `${InfiniteTableColumnCellClassName}Expander`,
26339
- groupRenderStrategy === "single-column" || groupRenderStrategy === "multi-column" && (!rowInfo.isGroupRow || selectionCheckBox) ? GroupRowExpanderCls({ align: align2 }) : null
26343
+ groupRenderStrategy === "single-column" || groupRenderStrategy === "multi-column" && (!rowInfo.isGroupRow || selectionCheckBox || isNestedGroupRow && column.field) ? GroupRowExpanderCls({ align: align2 }) : null
26340
26344
  );
26341
- if (groupRenderStrategy === "multi-column") {
26342
- if (groupIndexForColumn + 1 !== groupRowInfo.groupNesting && groupRowInfo.isGroupRow) {
26345
+ if (isNestedGroupRow) {
26346
+ if (!column.field) {
26343
26347
  return selectionCheckBox ? /* @__PURE__ */ React56.createElement("div", { className }, selectionCheckBox) : null;
26344
26348
  }
26349
+ return /* @__PURE__ */ React56.createElement("div", { className }, selectionCheckBox, /* @__PURE__ */ React56.createElement("div", { className: cssEllipsisClassName }, valueToRender ?? null));
26345
26350
  } else if (groupRenderStrategy === "single-column" && !groupRowInfo.isGroupRow) {
26346
26351
  }
26347
26352
  return /* @__PURE__ */ React56.createElement("div", { className }, groupIcon, selectionCheckBox, /* @__PURE__ */ React56.createElement("div", { className: cssEllipsisClassName }, valueToRender ?? null));
@@ -27621,7 +27626,7 @@ var useLicense = (licenseKey = "") => {
27621
27626
  }
27622
27627
  let valid2 = isValidLicense(licenseKey, {
27623
27628
  publishedAt: 1624970570587,
27624
- version: "9.0.1"
27629
+ version: "9.0.2"
27625
27630
  });
27626
27631
  if (!licenseKey && !valid2 && isInsidePlayground) {
27627
27632
  return true;
package/index.dev.mjs CHANGED
@@ -6443,9 +6443,12 @@ function getGroupByColumnReference(options) {
6443
6443
  if (column.groupByForColumn) {
6444
6444
  if (rowInfo.isGroupRow) {
6445
6445
  const rowGroupBy = rowInfo.groupBy[rowInfo.groupBy.length - 1];
6446
- groupByColumn = rowGroupBy ? fieldsToColumn.get(
6447
- rowGroupBy.field || rowGroupBy.groupField
6448
- ) : void 0;
6446
+ const isThisColumnGroupLevel = Array.isArray(column.groupByForColumn) || column.groupByForColumn === rowGroupBy;
6447
+ if (isThisColumnGroupLevel) {
6448
+ groupByColumn = rowGroupBy ? fieldsToColumn.get(
6449
+ rowGroupBy.field || rowGroupBy.groupField
6450
+ ) : void 0;
6451
+ }
6449
6452
  }
6450
6453
  if (!groupByColumn && column.field) {
6451
6454
  groupByColumn = fieldsToColumn.get(column.field);
@@ -26263,17 +26266,19 @@ function getGroupColumnRender({
26263
26266
  const { rowInfo, renderBag, column, align: align2 } = renderOptions;
26264
26267
  let { value: valueToRender, groupIcon, selectionCheckBox } = renderBag;
26265
26268
  const groupRowInfo = rowInfo;
26269
+ const isNestedGroupRow = groupRenderStrategy === "multi-column" && groupRowInfo.isGroupRow && groupIndexForColumn + 1 !== groupRowInfo.groupNesting;
26266
26270
  const className = join(
26267
26271
  display.flex,
26268
26272
  column.align === "end" ? flexFlow.rowReverse : flexFlow.row,
26269
26273
  alignItems.center,
26270
26274
  `${InfiniteTableColumnCellClassName}Expander`,
26271
- groupRenderStrategy === "single-column" || groupRenderStrategy === "multi-column" && (!rowInfo.isGroupRow || selectionCheckBox) ? GroupRowExpanderCls({ align: align2 }) : null
26275
+ groupRenderStrategy === "single-column" || groupRenderStrategy === "multi-column" && (!rowInfo.isGroupRow || selectionCheckBox || isNestedGroupRow && column.field) ? GroupRowExpanderCls({ align: align2 }) : null
26272
26276
  );
26273
- if (groupRenderStrategy === "multi-column") {
26274
- if (groupIndexForColumn + 1 !== groupRowInfo.groupNesting && groupRowInfo.isGroupRow) {
26277
+ if (isNestedGroupRow) {
26278
+ if (!column.field) {
26275
26279
  return selectionCheckBox ? /* @__PURE__ */ React56.createElement("div", { className }, selectionCheckBox) : null;
26276
26280
  }
26281
+ return /* @__PURE__ */ React56.createElement("div", { className }, selectionCheckBox, /* @__PURE__ */ React56.createElement("div", { className: cssEllipsisClassName }, valueToRender ?? null));
26277
26282
  } else if (groupRenderStrategy === "single-column" && !groupRowInfo.isGroupRow) {
26278
26283
  }
26279
26284
  return /* @__PURE__ */ React56.createElement("div", { className }, groupIcon, selectionCheckBox, /* @__PURE__ */ React56.createElement("div", { className: cssEllipsisClassName }, valueToRender ?? null));
@@ -27553,7 +27558,7 @@ var useLicense = (licenseKey = "") => {
27553
27558
  }
27554
27559
  let valid2 = isValidLicense(licenseKey, {
27555
27560
  publishedAt: 1624970570587,
27556
- version: "9.0.1"
27561
+ version: "9.0.2"
27557
27562
  });
27558
27563
  if (!licenseKey && !valid2 && isInsidePlayground) {
27559
27564
  return true;