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
While working with symfonycasts/dynamic-forms I observed two issues which seem to stem from the same cause:
A not-expandedChoiceType without placeholder whose value is null will appear as a <select> with the first <option> selected. The state of the component is then out-of-sync.
When refreshing a page with a form, browsers will populate fields with the value the user previously changed. As this happens without any user interaction, the component won’t be aware of these changes and will keep its default state.
The first issue can be worked around by adding a placeholder, and the second by setting to the fields which must keep their value the autocomplete attribute to off.
Maybe the component could react to the load event to update its state?