This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 73
Bugs with pagination/selections when number of data rows changes #924
Comments
samlishak-artemis
changed the title
Bugs with pagination when number of data rows changes
Bugs with pagination/selections when number of data rows changes
Jul 14, 2021
Hi, I've encountered a similar issue: When I change a value in one of my dropdowns, my table now shows 2 rows. If I try to select one of those rows, I can't. In order to make it work , I have to go back to the previous dropdown value combinations, then unselect that row and then change the dropdowns. Sample data:
|
@AnnMarieW Are there any updates on the issue relating update/removing rows and it's relationship with |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A few different bugs can be demonstrated with the following app.
It just shows a button and a table; the table has 10 rows if the button has been clicked an odd number of times, and 30 otherwise. The table shows 10 rows per page. Each row has an ID, which is incremented by 1 for every row when there are 30 rows, and incremented by 2 otherwise.
Table disappears when selected page no longer exists
There doesn't appear to be a way out of this situation. Maybe it could be fixed by a workaround where a callback updates
page_current
based ondata
andpage_size
, but it might be neater if it was automatically handled by the component.Uncaught TypeError: Cannot read property 'id' of undefined
after a row has been selected then removedI think this is because
selected_rows
contains row indices that are outside of the current data. Again, maybe it could be worked around with a callback to updateselected_rows
based ondata
.Incorrect rows remain selected when data changes
selected_row_ids
is still["id-2", "id-4"]
.selected_rows
appears to be the "primary" way of remembering which rows are selected, andselected_row_ids
just follows on from that. In this situation, it seems like using storing the row IDs would make more sense, as this example represents a sort of filtering action where some rows have been removed from the table, so the user would want the same row IDs selected after filtering.Having
selected_row_ids
as the "primary" way of storing the selected rows rather thanselected_rows
also fixes a related issue I'm having where I want to modifyselected_row_ids
from another callback, but it won't actually update the tickboxes becauseselected_rows
isn't changing.The text was updated successfully, but these errors were encountered: