@tanstack/react-table 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.
@@ -2715,8 +2715,10 @@ const Headers = {
2715
2715
  }
2716
2716
  }),
2717
2717
  getLeftHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.left], (allColumns, leafColumns, left) => {
2718
- leafColumns = leafColumns.filter(column => left == null ? void 0 : left.includes(column.id));
2719
- return buildHeaderGroups(allColumns, leafColumns, instance, 'left');
2718
+ var _left$map$filter;
2719
+
2720
+ const orderedLeafColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];
2721
+ return buildHeaderGroups(allColumns, orderedLeafColumns, instance, 'left');
2720
2722
  }, {
2721
2723
  key: process.env.NODE_ENV === 'development' && 'getLeftHeaderGroups',
2722
2724
  debug: () => {
@@ -2726,8 +2728,10 @@ const Headers = {
2726
2728
  }
2727
2729
  }),
2728
2730
  getRightHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.right], (allColumns, leafColumns, right) => {
2729
- leafColumns = leafColumns.filter(column => right == null ? void 0 : right.includes(column.id));
2730
- return buildHeaderGroups(allColumns, leafColumns, instance, 'right');
2731
+ var _right$map$filter;
2732
+
2733
+ const orderedLeafColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];
2734
+ return buildHeaderGroups(allColumns, orderedLeafColumns, instance, 'right');
2731
2735
  }, {
2732
2736
  key: process.env.NODE_ENV === 'development' && 'getRightHeaderGroups',
2733
2737
  debug: () => {