Closed
Description
Describe the bug
When using two or more DropDownTree components in the same page, sometimes clicks for selecting a dropdown do not unselect the previously selected dropdown.
To Reproduce
https://codesandbox.io/s/j2z20j56rw
- click on the first dropdown
- select an element
- click on the second dropdown
Result: Both dropdowns are open
Expected behavior
There should only be only one dropdown selected or opened at a time
Screenshots
Environment (please complete the following information):
Reproducible on any browser
Additional context
It seems like the function utils/isOutsideClick
can detect if the dropdowns are different only if the className
property is different, maybe an additional generated key by component instance could fix this method.