@tanstack/table-core 8.11.3 → 8.11.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.
- package/build/lib/core/column.js.map +1 -1
- package/build/lib/core/headers.js.map +1 -1
- package/build/lib/core/table.js.map +1 -1
- package/build/lib/features/ColumnSizing.d.ts +1 -1
- package/build/lib/features/ColumnSizing.js +12 -9
- package/build/lib/features/ColumnSizing.js.map +1 -1
- package/build/lib/features/Grouping.js.map +1 -1
- package/build/lib/features/Pagination.js.map +1 -1
- package/build/lib/features/Pinning.js.map +1 -1
- package/build/lib/index.esm.js +12 -9
- package/build/lib/index.esm.js.map +1 -1
- package/build/lib/index.mjs +12 -9
- package/build/lib/index.mjs.map +1 -1
- package/build/umd/index.development.js +12 -9
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/features/ColumnSizing.ts +22 -10
package/build/lib/index.mjs
CHANGED
|
@@ -601,7 +601,10 @@ const ColumnSizing = {
|
|
|
601
601
|
}
|
|
602
602
|
return 0;
|
|
603
603
|
};
|
|
604
|
-
header.getResizeHandler = ()
|
|
604
|
+
header.getResizeHandler = function (contextDocument) {
|
|
605
|
+
if (contextDocument === void 0) {
|
|
606
|
+
contextDocument = document;
|
|
607
|
+
}
|
|
605
608
|
const column = table.getColumn(header.column.id);
|
|
606
609
|
const canResize = column == null ? void 0 : column.getCanResize();
|
|
607
610
|
return e => {
|
|
@@ -661,8 +664,8 @@ const ColumnSizing = {
|
|
|
661
664
|
const mouseEvents = {
|
|
662
665
|
moveHandler: e => onMove(e.clientX),
|
|
663
666
|
upHandler: e => {
|
|
664
|
-
|
|
665
|
-
|
|
667
|
+
contextDocument.removeEventListener('mousemove', mouseEvents.moveHandler);
|
|
668
|
+
contextDocument.removeEventListener('mouseup', mouseEvents.upHandler);
|
|
666
669
|
onEnd(e.clientX);
|
|
667
670
|
}
|
|
668
671
|
};
|
|
@@ -677,8 +680,8 @@ const ColumnSizing = {
|
|
|
677
680
|
},
|
|
678
681
|
upHandler: e => {
|
|
679
682
|
var _e$touches$;
|
|
680
|
-
|
|
681
|
-
|
|
683
|
+
contextDocument.removeEventListener('touchmove', touchEvents.moveHandler);
|
|
684
|
+
contextDocument.removeEventListener('touchend', touchEvents.upHandler);
|
|
682
685
|
if (e.cancelable) {
|
|
683
686
|
e.preventDefault();
|
|
684
687
|
e.stopPropagation();
|
|
@@ -690,11 +693,11 @@ const ColumnSizing = {
|
|
|
690
693
|
passive: false
|
|
691
694
|
} : false;
|
|
692
695
|
if (isTouchStartEvent(e)) {
|
|
693
|
-
|
|
694
|
-
|
|
696
|
+
contextDocument.addEventListener('touchmove', touchEvents.moveHandler, passiveIfSupported);
|
|
697
|
+
contextDocument.addEventListener('touchend', touchEvents.upHandler, passiveIfSupported);
|
|
695
698
|
} else {
|
|
696
|
-
|
|
697
|
-
|
|
699
|
+
contextDocument.addEventListener('mousemove', mouseEvents.moveHandler, passiveIfSupported);
|
|
700
|
+
contextDocument.addEventListener('mouseup', mouseEvents.upHandler, passiveIfSupported);
|
|
698
701
|
}
|
|
699
702
|
table.setColumnSizingInfo(old => ({
|
|
700
703
|
...old,
|