Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progressive Load: Scroll on Basic Renderer jumps to top while scrolling #4469

Closed
Bobcat64 opened this issue Apr 18, 2024 · 2 comments · May be fixed by #4481
Closed

Progressive Load: Scroll on Basic Renderer jumps to top while scrolling #4469

Bobcat64 opened this issue Apr 18, 2024 · 2 comments · May be fixed by #4481
Labels
Possible Bug A possible bug that needs investigation

Comments

@Bobcat64
Copy link

Describe the bug
Basic Vertical Renderer bounces to top when using Progressive Load Scroll. This happens when new data is fetched and added from the server.

Tabulator Info

  • Tabulator 6.2.0

Working Example
https://jsfiddle.net/qsk5zLwh/2/

To Reproduce

  1. Construct table with renderVertical:"basic" and progressiveLoad:"scroll"
  2. Connect table to remote source with enough rows to require multiple requests
  3. Scroll table towards bottom
  4. Notice table jumps to top and scroll bar shrink as new rows were added

Expected behavior
Smooth scrolling. Fetching the next page should not reset the scroll position.

Desktop:

  • OS: Windows 10
  • Browser Chrome
  • Version 123.0.6312.122

Additional context
BasicVerticalRenderer rerenderRows clears all rows then renders them again. This shrinks the container element and resets the scroll position. Documentation for renderers states that rerenderRows should maintain scroll position.

Have encountered scrolling issues using the default virtual dom renderer like #4353 and #3654 both of which are resolved by switching to the basic renderer.

I have used the suggestion in #4424 and made the basic renderer's rerenderRows remember the scrollTop before clearing and then reapplying it after rendering to resolve the issue.

@cjaeriksson
Copy link

Seeing the same thing with the virtual renderer (tried the basic as well). All rows have the same height, so it shouldn't be related to any issues with variable row heights.

@olifolkerd
Copy link
Owner

You can't use progressive scroll and the basic render they incompatible. The basic renderer is extremely simple and will redraw the whole table when new data is added, resetting the position.

If you have a scrolling table you should be using the virtual renderer.

The basic renderer is only intended for very simple tables

@olifolkerd olifolkerd closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Possible Bug A possible bug that needs investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants