Closed djdannycastillo closed 9 months ago
Hi @djdannycastillo!
First of all, thank you for detailing the bug so much - it helps a lot!
About the issue, I've reviewed it and you are right. Checking the first row checks the rest of the first rows when there's pagination. We need to address this.
Thanks again for the feedback!
Describe the bug When you add a DxcCheckbox component for each item to rows array, checkboxes not being checked separately, instead of, checkboxes are being checked based on index in the pagination. I can checked each checkbox separately if I use checked prop but every time I update the state of the checkboxes, the table is re-rendered and it returns to the first page.
To Reproduce
Create a simple component using the example in the documentation https://developer.dxc.com/halstack/10/components/resultset-table/
Add a DxcCheckbox for each element like this:
const rows = [ [ { displayValue: <DxcCheckbox /> }, { displayValue: "001"}, { displayValue: "Cris"}, { displayValue: "Paris"} ] ]
Add more than 5 elements in the rows array, in order to display pagination
Check the first DxcCheckbox in the first page and navigate to the others pages, you will see all DxcCheckbox in the first position will be checked
Expected behaviour We want to check each element into the array separately to handle the checkboxes are been checked
Screenshots