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
The SelectableSearchInput component has a state searchValue, this is displayed within the text input.
The component also accepts an input object value which has a property text.
If the text property of the value input changes the value that is sent when submitting the input does change but the shown value inside the input doesn't.
One simple way to avoid this would be to add a useEffect to the SelectableSearchInput to update the state when the input changes. i.E.
In our case it is a problem when we restore the state of the SelectableSearchInput from the myview in the customer search.
Other hypothetical scenarios could be restoring a form draft that uses a SelectableSearchInput when the user wants to continue with it or a SelectableSearchInput which is pre-filled based on the value of another input.
Describe the bug
The SelectableSearchInput component has a state
searchValue
, this is displayed within the text input.The component also accepts an input object
value
which has a propertytext
.If the
text
property of thevalue
input changes the value that is sent when submitting the input does change but the shown value inside the input doesn't.One simple way to avoid this would be to add a useEffect to the SelectableSearchInput to update the state when the input changes. i.E.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The shown value is in sync with the value that is sent on submitting.
The text was updated successfully, but these errors were encountered: