@tanstack/table-core 8.0.0-alpha.74 → 8.0.0-alpha.76

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.
@@ -2699,8 +2699,10 @@
2699
2699
  }
2700
2700
  }),
2701
2701
  getLeftHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.left], (allColumns, leafColumns, left) => {
2702
- leafColumns = leafColumns.filter(column => left == null ? void 0 : left.includes(column.id));
2703
- return buildHeaderGroups(allColumns, leafColumns, instance, 'left');
2702
+ var _left$map$filter;
2703
+
2704
+ const orderedLeafColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];
2705
+ return buildHeaderGroups(allColumns, orderedLeafColumns, instance, 'left');
2704
2706
  }, {
2705
2707
  key: 'getLeftHeaderGroups',
2706
2708
  debug: () => {
@@ -2710,8 +2712,10 @@
2710
2712
  }
2711
2713
  }),
2712
2714
  getRightHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.right], (allColumns, leafColumns, right) => {
2713
- leafColumns = leafColumns.filter(column => right == null ? void 0 : right.includes(column.id));
2714
- return buildHeaderGroups(allColumns, leafColumns, instance, 'right');
2715
+ var _right$map$filter;
2716
+
2717
+ const orderedLeafColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];
2718
+ return buildHeaderGroups(allColumns, orderedLeafColumns, instance, 'right');
2715
2719
  }, {
2716
2720
  key: 'getRightHeaderGroups',
2717
2721
  debug: () => {