Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE Temporary DataTable example of multi select across pagination #7173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MikeKingdom
Copy link
Collaborator

@MikeKingdom MikeKingdom commented Mar 23, 2024

This is a DataTable example that uses pagination of data that is only partial (ie as if it only grabs a page at a time of data from the backend) and allows selection across pages and the items are selected by default.

To do this in a scalable way you instead need to track what items get deselected. This also means that at the time you want to submit this result to a backend API, the API needs to support being told what items you don't want selected.

To avoid this you would need a reasonable api to get the entire list of primary keys for the selected items which isn't scalable.

Note the select/deselect all checkbox in the header of Grommet DataTable component won't be able to support this across pagination without the entire data set. So if you go this route you'd likely have to disable that checkbox via allowSelectAll={false}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant