Draft: feat: new component for selecting all items in the table
Description
feat: new component for selecting all items in the table
- New SelectAllItemsAlert component was created. This component can be displayed in all tables where the master checkbox exists and if there are more then one pages.
- All the selection logic was improved and now it should work correctly wth all actions (moving between pages, selecting concrete page, changing page size, sorting).
- Usually bulk operations works only with displayed data, but if you select all items, then the bulk operation is executed for all (also not displayed) items.
BREAKING CHANGE: bulk operations now can be executed also for not displayed data (with select all header alert in tables)
How to test
- It is possible to select all items in the table.
- Selected items are cached when you change pages. When all data are not selected via the new select all header alert, then bulk operations are executed just for displayed data.
- Selection is restored from the cache on changing items per page and sorting.
- Master toggle (and its state) corresponds just to the state on the current page.
- The whole selection is cleared when some filter is applied.
- Server-side and client-side pagination behave exactly the same.
Author's checklist
-
I have followed the contribution guidelines -
This MR has been tested or does not change functionality -
I have added relevant merge request dependencies (if this MR has any) -
I have added the correct labels -
I have assigned reviewers (if any are relevant) -
I have edited the documentation (if the changes require it) or I have noted the need for the change if I do not have access to the documentation -
I have marked all introduced BREAKING CHANGES or necessary DEPLOYMENT NOTES in the commit message(s)
Reviewer's checklist
-
This MR has been tested or does not change functionality -
This MR has correct commit message format
Other information
Current state: implementation works for members-list
- it should be copied to all other client-side paginated lists. For the server-side paginated lists, the implementation needs to be changed (TODO).
Related issues
Closes STR-1158