Skip to content

Different behavior (selecting the checkbox VS clicking the label) with multiple instances on the same page #212

Closed
@stoberov

Description

@stoberov

Describe the bug

I'm currently using version 1.16.0 and have a page with 2 DropdownTreeSelect instances on it.
Dropdown 1 works as expected. Dropdown 2, however, works as expected only when selecting the checkboxes - if you clicked any of the Dropdown 2 labels, the change affects items in Dropdown 1 instead.

I've noticed that the behavior is not present with older version of the module - 1.10.0 and below. So I'm guessing it is introduced recently, or there is some extra prop that needs to be passed these days.

To Reproduce

Sample: https://codesandbox.io/embed/qlzpr7lzmj?fontsize=14

If you select A, B or C (either checkbox or label) - all good.
If you select D, E or F by checkbox - all good.
If you select D, E or F by clicking on the label (label = the actual letter visible on the screen, to the right of the checkbox), this will select A, B or C instead.

Expected behavior
Clicking on D / E / F labels should select D / E / F. It should not select A / B / C.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions