-
Notifications
You must be signed in to change notification settings - Fork 100
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
Wire:model not updating on change #12
Comments
From what I've seen the livewire select component currently just emits an event when it changes values, so as a workaround for the time being you could catch it with a listener like below. <livewire:selects.advert-format-select
name="mediaFormatId"
:value="$mediaFormatId" /> protected $listeners = [
'mediaFormatIdUpdated' => 'setMediaFormatId',
];
public function setMediaFormatId($object)
{
$this->mediaFormatId = $object['value'];
} |
hello @Neoglyph still not working for me |
Which part? |
Thanks for sharing this solution. I spend a few days to understand how can get the value, and only need to include a listener into my component and all this. |
I'm not sure how this works since there is no documentation, but when a value is selected there is no change to the model.
<livewire:user-select wire:model="selectedUser" wire:change="change" name="user_id" value="$selectedUser" placeholder="Choose A User" />
the parent component echos the value selectedUser, but it never changes. If you do this in a standard input form like livewire documents suggest. it works. Am I missing something?
The text was updated successfully, but these errors were encountered: