Initialize the model with select box #2956
MichaelMackus
started this conversation in
3. Feature Ideas
Replies: 1 comment
-
Input box don't get initialised either (unless something has changed recently). The reasoning about that was to have a unique source of truth which is the component state so the value should be set on the relevant x-data properties. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The model does not seem to be initialized to the selected element (using
x-model
). For example: https://alpinejs.dev/directives/model#single-select - you'll see that you have to actually change the value of the select to see the value update. I can always just initialize the model withx-init
using the value of the select box, but I think this should be initialized like an input box is (when the value is set in HTML). I'm sure there are other priorities but this could help match how the rest of the x-model examples work.Beta Was this translation helpful? Give feedback.
All reactions