Open BentleyDavis opened 12 months ago
Description the bug defaultIsOpen feature does not work when combined with closeOnChangedValue
defaultIsOpen
closeOnChangedValue
Sandbox / Git Repo https://codesandbox.io/s/defaultisopen-and-closeonchangedvalue-q4mrsd
To Reproduce Steps to reproduce the behavior:
defaultIsOpen={true}
closeOnChangedValue={true}
Expected behavior The select should stay open until acted on. It opens then quickly shuts before the user can get to it.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information): N/A
Additional context Looks like in dropdown.tsx line 35 the useEffect closes the select on all renders including the first.
useEffect(() => { if (closeOnChangedValue) { setExpanded(false); } }, [value]);
Description the bug
defaultIsOpen
feature does not work when combined withcloseOnChangedValue
Sandbox / Git Repo https://codesandbox.io/s/defaultisopen-and-closeonchangedvalue-q4mrsd
To Reproduce Steps to reproduce the behavior:
defaultIsOpen={true}
closeOnChangedValue={true}
Expected behavior The select should stay open until acted on. It opens then quickly shuts before the user can get to it.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information): N/A
Additional context Looks like in dropdown.tsx line 35 the useEffect closes the select on all renders including the first.