You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the behaviour I would like to have:
1- I select a value from a field A
2- I select a value from this multi-select-component
3- I go back to field A and I select another value
4- I have new options available in multi-select-component
5- the value from the multi-select-component should be cleared, and I can choose a value from the new options available
Here is the behaviour I currently get:
1.2.3.4- all the same until 4
5- the value is not cleared
To ensure it clears, I added a useffect that triggers when the options changes. It seems to be working fine now.
It is the right approach or something else should be implemented?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Here is the behaviour I would like to have:
1- I select a value from a field A
2- I select a value from this multi-select-component
3- I go back to field A and I select another value
4- I have new options available in multi-select-component
5- the value from the multi-select-component should be cleared, and I can choose a value from the new options available
Here is the behaviour I currently get:
1.2.3.4- all the same until 4
5- the value is not cleared
To ensure it clears, I added a useffect that triggers when the options changes. It seems to be working fine now.
It is the right approach or something else should be implemented?
Beta Was this translation helpful? Give feedback.
All reactions