I've got a use-case that doesn't seem well supported by react-dropdown-select(RDS). I am attempting to use RDS as the base for a Tree component, but there seems to be some inconsistencies with how the component handles prop updates under the hood. I've got a codesandbox that reproduces the issue that I'll spell out below.
https://codesandbox.io/s/rds-values-prop-inconsistent-fkpr23
In this setup, A1 and A2 are considered children of A.
Desired interactions:
- Select A -> A1 and A2 become selected
- Do (1) then Deselect A -> Deselects A1 and A2
- Do (1) then Deselect A1 or A2 -> Deselects A
Actual interactions:
- Does what is desired
- Only deselects A and leaves A1 and A2 selected
- Only deselects A1 or A2 and leaves A and the other child selected
I added some simple console.log statements that show the individual processing steps. I also added a console.warn to show what the actual value of the values prop is immediately prior to setting it as a prop for RDS. For both interactions (2) and (3), the values prop has the correct value.
Screenshots
(2)


(3)


I've got a use-case that doesn't seem well supported by
react-dropdown-select(RDS). I am attempting to use RDS as the base for a Tree component, but there seems to be some inconsistencies with how the component handles prop updates under the hood. I've got acodesandboxthat reproduces the issue that I'll spell out below.https://codesandbox.io/s/rds-values-prop-inconsistent-fkpr23
In this setup, A1 and A2 are considered children of A.
Desired interactions:
Actual interactions:
I added some simple console.log statements that show the individual processing steps. I also added a console.warn to show what the actual value of the
valuesprop is immediately prior to setting it as a prop for RDS. For both interactions (2) and (3), thevaluesprop has the correct value.Screenshots

(2)
(3)
