fix: scrolling inside the table with scrollbar (#9753)

Fixed- when scrolling inside the table with scrollbar, cursor also
selects rows. Now on scrolling with scrollbar content is scrolled in
respective direction as expected and table rows don't get selected.

fixes issue #6773

---------

Co-authored-by: nitin <142569587+ehconitin@users.noreply.github.com>
Co-authored-by: ehconitin <nitinkoche03@gmail.com>
This commit is contained in:
Chandragupt Gosavi
2025-01-23 21:11:57 +05:30
committed by GitHub
parent bbd3af108b
commit 1d7cbcabee

View File

@ -139,7 +139,18 @@ export const ScrollWrapper = ({
},
events: {
updated: (osInstance) => {
const { scrollOffsetElement: target } = osInstance.elements();
const {
scrollOffsetElement: target,
scrollbarVertical,
scrollbarHorizontal,
} = osInstance.elements();
if (scrollbarVertical !== null) {
scrollbarVertical.track.dataset.selectDisable = 'true';
}
if (scrollbarHorizontal !== null) {
scrollbarHorizontal.track.dataset.selectDisable = 'true';
}
setScrollBottom(
target.scrollHeight - target.clientHeight - target.scrollTop,
);