Open Fak3 opened 1 month ago
My current workaround is to assign alpine data manually on change instead of using x-model:
<select
x-init="$el.choices = new Choices($el, {})"
x-data="{curvalue: null}"
@change='curvalue = $el.choices.getValue(true)'
>
When user selects \<option value="x">, then \<select> value bound with alpinejs x-model attribute becomes '{value: "x"}' instead of 'x'
To Reproduce
Expected behavior Expected same behavior as regular \<select>: When user selects \<option value="x">, then \<select> value becomes 'x'
Choices version and bundle
Desktop (please complete the following information):