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

How to reset Dash DataTable `selected_cells` varaible to None from within a callback

$
0
0
  1. Having a DataTable on my app, it operates as expected. I import the selected_cells field from the datatable into the callback and it is initially None because nothing has been clicked on yet.
  2. Then I click on a cell and the print statement i have set up shows me the correct values of what i clicked on.
  3. However I am running into an issue with reverting the selection back to None so that the cell de-selects.

Can anyone help with how to get that None value back to the DataTable from the callback?

Excerpt from the Dash Docs: (https://dash.plotly.com/datatable/reference)

selected_cells ( dict ; optional): selected_cells represents the set of cells that are selected, as an array of objects, each item similar to active_cell . Multiple cells can be selected by holding down shift and clicking on a different cell or holding down shift and navigating with the arrow keys. selected_cells has the following type: list of dicts containing keys ‘row’, ‘column’, ‘row_id’, ‘column_id’. Those keys have the following types:

  • row (number; optional)
  • column (number; optional)
  • row_id (string | number; optional)
  • column_id (string; optional)

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles