Problem with Reactive Searchable Select
Recently I started getting this weird error whenever I try to submit a form using this:
The callback inside the
searchable()
method is actually necessary in order for the form to be reactive when using disabled()
(because searchable selects can't be disabled). Anyways, I recently started to get this weird error.
Upon further investigation, the error does not occur when I remove the callback inside the searchable()
method, which basically means I won't be able to have a reactive searchable Select unless I find the fix for this.
This works and no error occurs:
Please help!11 Replies
Wonder if it’s related to this? Maybe when using disabled in conjunction with searchable it’s losing its wire:model?
https://github.com/livewire/livewire/discussions/5600
GitHub
Str::studly() give back Too Few Arguments after update. · livewire ...
My project just updated to livewire version 2.12.2, and now it is randomly giving out this error: Too few arguments to function Illuminate\Support\Str::studly(), 0 passed in /home/tbsweb/sites/dyer...
Also mentioned is duplicate ids and deferring/lazy conflicts.
Yeah I saw that, but I'm not sure what I could do here to fix that. I saw
wire:model
would work instead of "wire:model.defer" or "wire:model.lazy", etc., but I think Reactive fields in Filament have to be lazy, defer, or debounceIs the wire:model blank or missing?
Something to do with the
entangle.defer
with the state in all of Filament's componentsIt removes "data.state" and has a second syncInput on update
Maybe because getStatePath() is returning null since it’s disabled? Might not be a way around that
Maybe you could do what we had discussed some time back about using 2 selects and hiding one of them. This seems like an easier use case than before since you’re not trying to pass the value back and forth.
But it does seem that the null name is the problem…same as what is mentioned in the GitHub issue
Yeah it seems that way.
Thanks
It works with disabled method just not searchable though which is weird why it would remove the name of the record
Seems like another one of those choices.js/livewire issues
Possibly... I thought it was working recently but I suppose not idk
Doing this worked out well for me, even though it’s a little weird and unorthodox to do 😂