x-model doesn't work for initial value. #3131
Unanswered
Sulaymon-dev
asked this question in
5. Bugs
Replies: 1 comment 6 replies
-
Directives are processed top to bottom. When your code initialises x-model, x-for hasn't run so there's nothing to select. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The x-model does not update the selected element on init:
When the page is initialized, the first selectbox selected correctly, but the other selectboxes select only the first option.
if i change the value of the model, then it works correctly.
CodePen Link: https://codepen.io/sulaymon-dev/pen/dyeyaXL?editors=1111
My JSON
My HTML
My JS
Beta Was this translation helpful? Give feedback.
All reactions