Open rafaelmaiach opened 3 years ago
A workaround I made on my side:
Before adding to my code, I tested directly on the carbon component by:
1) change the @change on cv-pagination to run a method `onPagination`
2) On the new method onPagination, I emitted the `pagination` event, to keep working as before, but I've also added a new line.
3) This new line is the following code:
this.$nextTick(() => {
this.updateRowsSelected()
});
Btw, I needed to add it on onSearch
as well to work with searches
A workaround I made on my side:
Before adding to my code, I tested directly on the carbon component by:
1) change the @change on cv-pagination to run a method `onPagination` 2) On the new method onPagination, I emitted the `pagination` event, to keep working as before, but I've also added a new line. 3) This new line is the following code: this.$nextTick(() => { this.updateRowsSelected() });
Btw, I needed to add it on
onSearch
as well to work with searches
This saved my day, thank you
This issue has been marked as stale because it has required additional info or a response from the author for over 14 days. When you get the chance, please comment with the additional info requested. Otherwise, this issue will be closed in 14 days.
[CvDataTable]: bug on pagination + selected items
Detailed description
Changing pages makes the selected items lose track.
Enables the batch action, as the CvDataTableRow key, I chose the key to be
row[0]
that is my table unique information. I select all the values on the displayed data and change to another page and go back to the previous page. The selected values are not marked as checked anymore. PS: this one can be a bug on my implementation. I'll leave some screenshots if it's from my side and someone can help me with the problem.Bug
CvDataTable + CvPagination + CvCheckbox
Pagination and Select items working
Chrome
"@carbon/vue": "2.34.1" "carbon-components": "10.24.0"
Additional information