- 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 initiallyNone
because nothing has been clicked on yet. - Then I click on a cell and the print statement i have set up shows me the correct values of what i clicked on.
- 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