Just a few thoughts on the dash table component after making an app that uses it heavily.
The way that the selectable indices interacts with the filtering is sort of screwy – if I have row 1 selected, and now I set the filter such that row 1 has different content, it updates the selection to the new content. To my mind, this is very unlikely to ever be the desired behavior – the user is selecting based on content, not based on row number. Perhaps selected_row_indices could work on the initial list of rows instead of the filtered one?
I often find the columns do not take up the entire width of the table. This must be some initialization bug because if I change the size of the browser window by any tiny amount, the columns expand to fill the table.
A couple of features would be nice: I’m pretty sure most of these have already been mentioned, just adding another vote.
select only one row
disable “select all” checkbox
select by just clicking on the row instead of the checkbox
Sorry for the multiple topics in one post – happy to put some of them into new issues.
This shouldn’t happen. Here’s the demo from usage.py
@chriddyp You’re right of course. I had a callback that reset the row selection when the table changed, and I didn’t realize it was getting called when the filter got activated.
(the other weird filter issue I mentioned still persists).
I’m curious as to how the callback looked like in order to be able to reset the row selection… using the selected_row_indices property as an Output, doesn’t work: it results in a Error loading dependencies for me.
In the above, the second callback takes advantage of the fact that the last row index to be selected seems
to be the first one listed. So returning only the first index as a list to update the selected_row_indices should
turn the multi-select into a single-select… if not for the error loading dependencies.
The selected_row_indices property seems to be read-only…
Thanks and it looks like you’re right. Resetting the selected_row_indices via the button works indeed,
but not via a callback triggered (directly or indirectly) by a change in the selected_row_indices itself.