-
-
Notifications
You must be signed in to change notification settings - Fork 72
Add derived properties derived_virtual_selected_rows
and derived_viewport_selected_rows
#147
Comments
@chriddyp I think what you are experiencing is the intended behavior. The current implementation maps the selected_rows to the actual row index in the dataframe, not in the viewport. Filtering and sorting will have no impact on selected_rows just like filtering/sorting has no impact on the underlying df. Would you be interested in knowing the viewport rows that are selected? |
Yes. And not just the page, but selected rows for the entire dataset. |
Ok. We could have derived selected_rows similar to the derived virtual and viewport data. e.g derived_virtual_selected_rows and derived_viewport_selected_rows that would contain an array of indices filtered/sorted for virtual and filtered/sorted/paged for viewport. Like the derived data these would be purely read-only. |
Users will also want to set these programatically, so there should be some version that is write-able. Ideally, they are the same property so that users can write in one callback and then read in a chained callback. |
This is how the existing prototype works: https://github.com/plotly/dash-table-experiments/blob/master/usage.py#L64 |
selected_rows is writeable -- do you mean to say we would need a way to set the selection through the derived ones? |
selected_rows
doesn't update on sort or filterderived_virtual_selected_rows
and derived_viewport_selected_rows
selected_rows
doesn't update on sort or filterSee this example: https://github.com/plotly/dash-docs/pull/232/files#diff-61a5d030fd2c372f3abe94110f039e85
The text was updated successfully, but these errors were encountered: