Open kdkavanagh opened 2 months ago
You're going to want to follow the pattern of DataTable.update_cell
and the other DataTable
methods that mutate data (clear
, sort
, add_column
, add_row
, add_columns
, add_rows
, remove_row
, etc):
There are a lot of caches that do need clearing. Most of that can be done in the background by setting a couple of flags:
But there will be other targets that need updating as well, if you want to reorder columns, etc. (I'd look at the existing methods to ensure you're resetting all of the column caches, etc.)
I'd like to be able to do some basic mutation of the underlying data, for example filtering rows or changing the column order based on user inputs in other components in the TUI
I know how to implement the functionality in the backend itself to actually mutate the dataframe, but less sure what would be required to refresh the UI after mutation or which caches, etc need to be invalidated.
Do you have any recommendations for how to best implement this? Does everything need to go thru the front end, or is there a way to directly change the contents of the backend and have the front end pick up the changes?