[Bug]: "Select All" checkbox function in table only selects the records from the page user is in
Detailed description
Users have been reporting that the "Select All" checkbox function in table only selects the records from the page they are in.
Steps:
- User opens an application that has a data table
- User clicks on "Select all" checkbox
Actual Result: Only first page is selected, for the additional pages have to be selected page by page or line by line.
Expected Result: All records from data table would be selected at once.
We would like to know if this is an expected behavior and if so, why - before we try to "fix" it ourselves if necessary.
This is being reported by IBM ESS (Entitled Systems Support) users.
I don't know how to replicate the issue in here (blue button doesnt take me anywhere): https://codesandbox.io/s/carbon-components-angular-0129r494ql
Additional information
Can be replicated in Carbon Angular storybook https://angular.carbondesignsystem.com/?path=/story/components-table--with-pagination
https://user-images.githubusercontent.com/20360162/168609772-98c37c70-572f-4beb-b23e-c53e74133533.mov
Hi @camilasb, this is an expected behavior. The idea of table with pagination is to retrieve data from backend as needed. As you go to the next page, you're updating the table model as needed instead of assigning all data to the model on initialization. Hence, we cannot select data that we aren't aware of.
Additionally from my observation, taking such path would raise complexities with selecting rows & filtering.
The table model has a selectAllChange observable that you can subscribe to and when you change the data on next page click, you can preselect the rows.
I see. I will share this with my team and see what they have to say. Thanks!