Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

DataTable selected_rows

$
0
0

Hi there,

I have a datatable with pagination and a callback which should update the selected rows for every page.
I don’t see why but when I change the page, the rows are selected for a sec and then deselected automatically. Did you encounter anything similar?

The callback:

@app.callback(
[Output(‘tbl2’, ‘data’),
Output(‘tbl2’, ‘selected_rows’)],
[Input(‘tbl2’, “page_current”),
Input(‘tbl2’, “page_size”)])
def update_table(page_current,page_size):
data = dframe.iloc[page_current*page_size:(page_current + 1)*page_size].to_dict(‘records’)

return data, [0,1,2,3,4]

Thanks a lot!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images