Skip to content

Checkbox not working properly with Resultset Table #1752

@djdannycastillo

Description

@djdannycastillo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjiraThis task is referenced in a story of Jira

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions