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