@tanstack/table-core 8.10.7 → 8.11.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.
@@ -543,6 +543,7 @@ const ColumnSizing = {
543
543
  getDefaultOptions: table => {
544
544
  return {
545
545
  columnResizeMode: 'onEnd',
546
+ columnResizeDirection: 'ltr',
546
547
  onColumnSizingChange: makeStateUpdater('columnSizing', table),
547
548
  onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', table)
548
549
  };
@@ -624,7 +625,8 @@ const ColumnSizing = {
624
625
  }
625
626
  table.setColumnSizingInfo(old => {
626
627
  var _old$startOffset, _old$startSize;
627
- const deltaOffset = clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0);
628
+ const deltaDirection = table.options.columnResizeDirection === 'rtl' ? -1 : 1;
629
+ const deltaOffset = (clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0)) * deltaDirection;
628
630
  const deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999);
629
631
  old.columnSizingStart.forEach(_ref3 => {
630
632
  let [columnId, headerSize] = _ref3;
@@ -1134,7 +1136,6 @@ const Filters = {
1134
1136
  // () => [column.getFacetedRowModel()],
1135
1137
  // facetedRowModel => getRowModelMinMaxValues(facetedRowModel, column.id),
1136
1138
  },
1137
-
1138
1139
  createRow: (row, table) => {
1139
1140
  row.columnFilters = {};
1140
1141
  row.columnFiltersMeta = {};
@@ -1928,7 +1929,6 @@ const RowSelection = {
1928
1929
  // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
1929
1930
  };
1930
1931
  },
1931
-
1932
1932
  createTable: table => {
1933
1933
  table.setRowSelection = updater => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater);
1934
1934
  table.resetRowSelection = defaultState => {
@@ -3061,6 +3061,7 @@ const createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {
3061
3061
  // helper.accessor('nested.bar', {
3062
3062
  // cell: info => info.getValue(),
3063
3063
  // })
3064
+
3064
3065
  function createColumnHelper() {
3065
3066
  return {
3066
3067
  accessor: (accessor, column) => {
@@ -3605,7 +3606,6 @@ function getGroupedRowModel() {
3605
3606
  // nonGroupedRowsById[subRow.id] = subRow;
3606
3607
  // }
3607
3608
  });
3608
-
3609
3609
  return row;
3610
3610
  });
3611
3611
  return aggregatedGroupedRows;
@@ -3622,7 +3622,6 @@ function getGroupedRowModel() {
3622
3622
  // nonGroupedRowsById[subRow.id] = subRow;
3623
3623
  // }
3624
3624
  });
3625
-
3626
3625
  return {
3627
3626
  rows: groupedRows,
3628
3627
  flatRows: groupedFlatRows,