You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version 130.0.6723.119 (Offizieller Build) (64-Bit)
Describe the bug
Adjusting the scrollTo and selecting a row makes the scroll bar to jump back to the position set in my callback. The callback is getting triggered only once though in the beginning.
Expected behavior
Since the callback is not getting triggered when selecting a row, the scroll bar should stay where I manually scrolled.
Code
import dash_ag_grid as dag
from dash import Dash, html, Input, Output
import pandas as pd
app = Dash(__name__)
df = pd.read_csv(
"https://raw.githubusercontent.com/plotly/datasets/master/ag-grid/olympic-winners.csv"
)
columnDefs = [
{"headerName": "Row", "valueGetter": {"function": "params.node.rowIndex"}}
] + [{"field": c} for c in df.columns]
app.layout = html.Div(
[
dag.AgGrid(
id="grid-scroll-to-start",
columnDefs=columnDefs,
rowData=df.to_dict("records"),
dashGridOptions={'rowSelection': 'single', 'animateRows': False}
),
]
)
@app.callback(
Output('grid-scroll-to-start', 'scrollTo'),
Input('grid-scroll-to-start', 'rowData')
)
def handle_scroll_to(rowData):
#dummy logic
row = rowData[100]
return {'data': row}
if __name__ == "__main__":
app.run(debug=True)
The text was updated successfully, but these errors were encountered:
@AnnMarieW You are right! This is a strange behaviour. I tested this locally within another folder and got the same problem. I then went and built it in a VM and there I didnt get it. We can close it for now, as the error doesnt seem to be always re producable.
pip list
Browser, Version and OS
Describe the bug
Adjusting the scrollTo and selecting a row makes the scroll bar to jump back to the position set in my callback. The callback is getting triggered only once though in the beginning.
Expected behavior
Since the callback is not getting triggered when selecting a row, the scroll bar should stay where I manually scrolled.
Code
The text was updated successfully, but these errors were encountered: