Tabulator scrolling to top all the time

I have a question on the Tabulator model in panel. I have created a Bug issue some time ago (Tabulator scrolls to top when other element on the page changes · Issue #4451 · holoviz/panel · GitHub), about the Table scrolling to the top all the time when something on the page is updated. I think this is solved in Panel 1.0, I assume by the DOM Shadow roots isolation somehow.

I do however still have the issue of scrolling to Row 0 after setting or patching the data. Looking into the source code, I found that on every patch, the element.scrollTop is set to this._lastVerticalScrollbarTopPosition. However, as far as I can see, this variable is initialised to 0, but never set to any other value. As such the scroll position is manually set to 0 on every patch.

Did I perhaps miss the point where the _lastVerticalScrollbarTopPosition is set, or is there a valid reason to always have the scroll position set it to 0?

I am not sure if the javascript tabulator object can patch without scroll position effects. In my usecase I patch a cell onclick, and ideally the cell would not move on patch. Could removing this scrollpos line perhaps achieve that?

Thanks and regards,
Wijnko

I have found a commit where the last line setting the _lastVerticalScrollbarTopPosition variable was deleted. Was the code still using this variable perhaps forgotten here? (@maximlt )

1 Like

Im experiencing the same issue, did you ever find a fix @Wijnko ?