I want to be able to "reset" a data table. How do I do that?
I have a defined an on_change('selected', my_callback) callback for my data table. The callback function has the following signature:
def my_callback(self, attr, old, new):
...
However I'm not able to deselect what has been selected after the my_callback handler is called.
I have tried to manipulate the new['1d'] or old['1d'] dictionaries without success.
What is the proper way to deselect rows in a data table and go back to the original state where nothing was selected?
There's a similar question on G-groups but it had no answers. Thanks
To deselect DataTable rows programmatically and go back to the original state where nothing was selected, you may use this in python:
source.selected.indices = []
where source is the ColumnDataSource for the DataTable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With