-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Data and friendsFor data components in grommetFor data components in grommetDataTableDataTable related issuesDataTable related issuesbugissue that does not match design or documentation and requires code changes to addressissue that does not match design or documentation and requires code changes to address
Description
Expected Behavior
When using DataTable's onSelect
with Data, my selections across views should be persist and accumulate as I change my view and make additional selections. For example, I should be able to:
Scenario 1
- Alter my data view - for example's sake, let's say the view returned 7 unselected records.
- Use the select all control in the table's header.
- Total selected should be 7.
- Adjust my view again, this time returning 5 unselected records.
- Select all in the current view.
- Total selected should be 12.
Scenario 2
- Alter my data view - for example's sake, let's say the view returned 7 unselected records.
- Use the select all control in the table's header.
- Total selected should be 7.
- Adjust my view again, this time returning 5 records (3 selected + 2 unselected).
- Select all in the current view.
- Total selected should be 9.
Scenario 3
- Alter my data view - for example's sake, let's say the view returned 7 unselected records.
- Use the select all control in the table's header.
- Total selected should be 7.
- Adjust my view again, this time returning 5 records (3 selected + 2 unselected).
- Select all in the current view.
- Total selected should be 9.
- Unselect all in the current view.
- Total selected should be 4.
Actual Behavior
Currently, my previously selected records are not retained after changing view and then selecting all. Instead, the previously selected records are replaced with my new selections.
URL, screen shot, or Codepen exhibiting the issue
Screen.Recording.2024-04-11.at.1.22.47.PM.mov
Steps to Reproduce
- Modify the Data/SpaceEx story by adding
select
andonSelect
. - Select all
- Change view by selecting another page or applying a new search or filter
- Select all again
Your Environment
- Grommet version:
- Browser Name and version:
- Operating System and version (desktop or mobile):
Metadata
Metadata
Assignees
Labels
Data and friendsFor data components in grommetFor data components in grommetDataTableDataTable related issuesDataTable related issuesbugissue that does not match design or documentation and requires code changes to addressissue that does not match design or documentation and requires code changes to address