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

Change currently selected row in Dash datatable with callback

$
0
0

@toddabrams wrote:

In a Dash datatable, when row_selectable is set to single, there are radio buttons that can be clicked by the user to the left of the table. Is it possible to reselect these radio buttons programmatically with a callback (for example, a next button that indexes the user through the rows)?

I was hoping to do something like this:

@app.callback(
    Output('table', 'selected_row_ids'),
    [Input('next-button', 'n_clicks'),
     State('table', 'selected_rowids')]
)
def index_next_row(n_clicks):
    index = selected_rowids[0]
    return [index + 1]

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles