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

Checkbox not working properly with Resultset Table #1752

Closed
djdannycastillo opened this issue Jan 4, 2024 · 1 comment · Fixed by #1773
Closed

Checkbox not working properly with Resultset Table #1752

djdannycastillo opened this issue Jan 4, 2024 · 1 comment · Fixed by #1773
Labels
bug Something isn't working jira This task is referenced in a story of Jira

Comments

@djdannycastillo
Copy link

djdannycastillo commented Jan 4, 2024

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

  1. Create a simple component using the example in the documentation https://developer.dxc.com/halstack/10/components/resultset-table/

  2. Add a DxcCheckbox for each element like this:

const rows = [ [ { displayValue: <DxcCheckbox /> }, { displayValue: "001"}, { displayValue: "Cris"}, { displayValue: "Paris"} ] ]

  1. Add more than 5 elements in the rows array, in order to display pagination

  2. 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
checkboxes-resultset-table

@GomezIvann
Copy link
Collaborator

GomezIvann commented Jan 19, 2024

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!

@GomezIvann GomezIvann added the bug Something isn't working label Jan 19, 2024
@kukoc kukoc added the jira This task is referenced in a story of Jira label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jira This task is referenced in a story of Jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants