How to reset selected value? #210
Unanswered
BigDaddyKahuna
asked this question in
Q&A
Replies: 1 comment
-
Hello! import Option from 'react-dropdown';
export const Menu = ( {options}: Option) ReactElement => {
const [ defaultPlaceholder, setDefaultPlaceholder ] = useState<Option>();
const defVal = {
label: 'default placeholder',
value: 'default value'
};
useEffect(() => {
if(someCond) setDefaultPlaceholder(defVal);
})
return <Dropdown value={defaultPlaceholder} /> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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?
Beta Was this translation helpful? Give feedback.
All reactions