Reputation: 87
I have products component which passes props to filters component thus filters component renders semantic-ui dropdowns filled up with passed props.
After change selection on some filter semantic sets state of dropdown to selected value.
"Clear all" button updates products and filters components but leaves dropdowns untouched as their state remains untouched. I've tried to pass into dropdowns some new custom props but didn't succeed.
Filters being rendered like so -
So the question is - how to unset value of semantic's dropdown?
Upvotes: 0
Views: 755
Reputation: 15841
as I can see value
prop on your dropDown isn't set.
Without this prop set the component is uncontrolled, if you add this props instead, changing the state reference of the value will also reset your select.
Upvotes: 1