@tanstack/vue-table 8.11.3 → 8.11.5
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.
|
@@ -616,7 +616,8 @@
|
|
|
616
616
|
}
|
|
617
617
|
return 0;
|
|
618
618
|
};
|
|
619
|
-
header.getResizeHandler =
|
|
619
|
+
header.getResizeHandler = _contextDocument => {
|
|
620
|
+
const contextDocument = _contextDocument || document;
|
|
620
621
|
const column = table.getColumn(header.column.id);
|
|
621
622
|
const canResize = column == null ? void 0 : column.getCanResize();
|
|
622
623
|
return e => {
|
|
@@ -676,8 +677,8 @@
|
|
|
676
677
|
const mouseEvents = {
|
|
677
678
|
moveHandler: e => onMove(e.clientX),
|
|
678
679
|
upHandler: e => {
|
|
679
|
-
|
|
680
|
-
|
|
680
|
+
contextDocument.removeEventListener('mousemove', mouseEvents.moveHandler);
|
|
681
|
+
contextDocument.removeEventListener('mouseup', mouseEvents.upHandler);
|
|
681
682
|
onEnd(e.clientX);
|
|
682
683
|
}
|
|
683
684
|
};
|
|
@@ -692,8 +693,8 @@
|
|
|
692
693
|
},
|
|
693
694
|
upHandler: e => {
|
|
694
695
|
var _e$touches$;
|
|
695
|
-
|
|
696
|
-
|
|
696
|
+
contextDocument.removeEventListener('touchmove', touchEvents.moveHandler);
|
|
697
|
+
contextDocument.removeEventListener('touchend', touchEvents.upHandler);
|
|
697
698
|
if (e.cancelable) {
|
|
698
699
|
e.preventDefault();
|
|
699
700
|
e.stopPropagation();
|
|
@@ -705,11 +706,11 @@
|
|
|
705
706
|
passive: false
|
|
706
707
|
} : false;
|
|
707
708
|
if (isTouchStartEvent(e)) {
|
|
708
|
-
|
|
709
|
-
|
|
709
|
+
contextDocument.addEventListener('touchmove', touchEvents.moveHandler, passiveIfSupported);
|
|
710
|
+
contextDocument.addEventListener('touchend', touchEvents.upHandler, passiveIfSupported);
|
|
710
711
|
} else {
|
|
711
|
-
|
|
712
|
-
|
|
712
|
+
contextDocument.addEventListener('mousemove', mouseEvents.moveHandler, passiveIfSupported);
|
|
713
|
+
contextDocument.addEventListener('mouseup', mouseEvents.upHandler, passiveIfSupported);
|
|
713
714
|
}
|
|
714
715
|
table.setColumnSizingInfo(old => ({
|
|
715
716
|
...old,
|