@tanstack/react-table 8.7.3 → 8.7.4
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.
|
@@ -636,11 +636,11 @@
|
|
|
636
636
|
const startSize = header.getSize();
|
|
637
637
|
const columnSizingStart = header ? header.getLeafHeaders().map(d => [d.column.id, d.column.getSize()]) : [[column.id, column.getSize()]];
|
|
638
638
|
const clientX = isTouchStartEvent(e) ? Math.round(e.touches[0].clientX) : e.clientX;
|
|
639
|
+
const newColumnSizing = {};
|
|
639
640
|
const updateOffset = (eventType, clientXPos) => {
|
|
640
641
|
if (typeof clientXPos !== 'number') {
|
|
641
642
|
return;
|
|
642
643
|
}
|
|
643
|
-
let newColumnSizing = {};
|
|
644
644
|
table.setColumnSizingInfo(old => {
|
|
645
645
|
var _old$startOffset, _old$startSize;
|
|
646
646
|
const deltaOffset = clientXPos - ((_old$startOffset = old?.startOffset) != null ? _old$startOffset : 0);
|
|
@@ -1066,8 +1066,9 @@
|
|
|
1066
1066
|
},
|
|
1067
1067
|
getFilterFn: () => {
|
|
1068
1068
|
var _table$options$filter;
|
|
1069
|
-
return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn()
|
|
1070
|
-
|
|
1069
|
+
return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn()
|
|
1070
|
+
// @ts-ignore
|
|
1071
|
+
: (_table$options$filter = table.options.filterFns?.[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn];
|
|
1071
1072
|
},
|
|
1072
1073
|
getCanFilter: () => {
|
|
1073
1074
|
var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
|
|
@@ -1155,8 +1156,9 @@
|
|
|
1155
1156
|
const {
|
|
1156
1157
|
globalFilterFn: globalFilterFn
|
|
1157
1158
|
} = table.options;
|
|
1158
|
-
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn()
|
|
1159
|
-
|
|
1159
|
+
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn()
|
|
1160
|
+
// @ts-ignore
|
|
1161
|
+
: (_table$options$filter2 = table.options.filterFns?.[globalFilterFn]) != null ? _table$options$filter2 : filterFns[globalFilterFn];
|
|
1160
1162
|
},
|
|
1161
1163
|
setColumnFilters: updater => {
|
|
1162
1164
|
const leafColumns = table.getAllLeafColumns();
|