Skip to content

Replace Data #138

Answered by s-cork
lewysigns asked this question in Q&A
Feb 28, 2024 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

Looking at the docs for tabulator

Note The replaceData function will only maintain scroll position when the Vitrual DOM has been enabled by setting a height on the table.

but if you're using pagination, it turns out the virtual dom is not enabled, and so scroll position is not maintained
if you use infinite scroll i.e.

    self.tabulator.options = {
      "height":600,
      "pagination": False,
      "progressive_load": "scroll", # load data into the table as the user scrolls
      "progressive_load_scroll_margin": 300, # trigger next data request when 
    }

then it works as expected

You seem to have hacked together a solution
here's another one

from anvil.js import get_dom_node


def r…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@lewysigns
Comment options

@lewysigns
Comment options

@s-cork
Comment options

Answer selected by lewysigns
@lewysigns
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants