Skip to content

[EuiBasicTable] "Select all" checkbox regenerates id on each render #3111

@tsullivan

Description

@tsullivan

It looks like the checkbox IDs are populated by making dynamic strings. This is making it impossible to do unit testing with snapshots.

Example of the dynamic strings, from the EUI docs:
image

Snapshot tests will fail with errors like:

                                    aria-label="Select all rows"
                                    checked={false}
                                    className="euiCheckbox__input"
                                    data-test-subj="checkboxSelectAll"
                                    disabled={true}
    -                               id="_selection_column-checkbox_fubvvpen"
    +                               id="_selection_column-checkbox_oruz39nk"
                                    onChange={[Function]}
                                    type="checkbox"
                                  />

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions