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

Tabulator: setting loading to True resets the page scrollbar #3450

Closed
maximlt opened this issue Apr 25, 2022 · 1 comment · Fixed by #3463
Closed

Tabulator: setting loading to True resets the page scrollbar #3450

maximlt opened this issue Apr 25, 2022 · 1 comment · Fixed by #3463
Labels
component: tabulator Related to the Tabulator widget type: bug Something isn't correct or isn't working

Comments

@maximlt
Copy link
Member

maximlt commented Apr 25, 2022

Setting loading on a Tabulator widget resets the window scrollbar to the top.

import numpy as np
import pandas as pd
import panel as pn
import time

pn.extension("tabulator")

df = pd.DataFrame(np.random.rand(50, 3))
table = pn.widgets.Tabulator(df)

b = pn.widgets.Button(name='loading')

def cb(e):
    table.loading = True
    time.sleep(0.5)
    table.loading = False

b.on_click(cb)

pn.Column(table, b).servable()

issue_tabulator_scroll

@maximlt maximlt added type: bug Something isn't correct or isn't working component: tabulator Related to the Tabulator widget labels Apr 25, 2022
@maximlt
Copy link
Member Author

maximlt commented Apr 25, 2022

Setting loading triggers a first extra re-render that resets the scroll position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tabulator Related to the Tabulator widget type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant