-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-render breaks form when serializedValue is set #2147
Comments
I've figured out a workaround until fixed. Seems to work without any issues for me.
|
I believe I've found the cause of this issue.
Here's whats happening:
I am not sure what the desired result was of this specific part :
So i'm not confident in proposing a solution yet. Although i did try a few things that seem to work and passed the tests. One is simply removing |
The same behaviour can be found in other input fields. The What you could do is to set the |
Expected behavior
The issue relates to forms consisting of a radio group and/or list box. An option is pre-selected by setting
serializedValue
(for example, after a back navigation). When a different option is clicked, a callback gets called that in turn will result in an additional render.Expected behaviour is that the option that was clicked is now selected and that
modelValue
has been updated accordingly.Actual Behavior
modelValue
is set to clicked value, but reset toserializedValue
right away. This means that no other option can be selected than the presetserializedValue
.Additional context
Edit: some erroneous imports had slipped into the snippet.
See code below to reproduce the issue. The
count
property gets updated in the callback for@model-value-changed
, resulting in a re-render. Original issue was raised because a team needed to callrequestUpdate
in the callback.The text was updated successfully, but these errors were encountered: