Closed BigDaddyKahuna closed 1 year ago
const [otherValue, setOtherValue] = useState('');
const [value, setValue] = useState<string | undefined>(undefined);
useEffect(() => {
setValue(undefined);
}, [otherValue]);
...
<Dropdown value={value} />
<Dropdown value={undefined} />
does not seem to work. – selecting an option will still update the state.
It appears that once you select an option from the dropdown, that value remains selected. I would like to reset the value to the default value after capturing the user's selection. Is this possible?