-
Notifications
You must be signed in to change notification settings - Fork 601
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
Laravel livewire wire:model directive gets {value: 'value'} instead of 'value' on change #943
Comments
Any suggestions? |
Nope, I'm using a module with internal livewire call, so for now i catching updating hook on livewire side and processing input from choices selects. |
That's what I do too, but it seems there could be a better solution. if( is_array($this->customer_id) ) { // choices.js value is an array |
Made exactly same thing but this is a crutch |
Actually that works: |
Yep, but, I have module that return me a function in x-data, there I call this.$wire.set() and so on No matter where to process input, problem is - why I need nested key "value" if there no other keys in input. |
Having the same issue. Echoing a model's value in blade gets actual value, but if inspecting a model ( |
I had similar problem and found a working solution there: https://forum.laravel-livewire.com/t/select-and-select-multi/1120 However, choices.js was losing style after update DOM, so I added to div with x-data: |
anyone got a working solution for this? |
Laravel livewire wire:model directive gets {value: 'value'} instead of 'value' on change
Steps to reproduce the behavior:
add wire:model to select, init choices and select something.
after selecting something it should return clear value except of json object unless it's multiple
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: