-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Found a small issue today when trying to set up a select option on an alpine form... if the x-data for the select x-model is blank, and the form is submitted, then no data for the select form is included.
This seems obvious since the user didn't choose an option, and the x-model/x-data is blank on page load, but often a user will leave a select form if the correct option is already displayed.
Here's a codepen to highlight the issue - https://codepen.io/leecolarelli/pen/PozxLGY
I think therefore that it would be better if alpine has a way to load the displayed option if no selection is made.
I was going to try and make a pull request but don't currently have time, and probably don't have the skills :)
Metadata
Metadata
Assignees
Labels
No labels