New issue with select after v2.17.39
My select is as follows:
Forms\Components\Select::make('task_id')
->relationship('task', 'name', function (Builder $query, $state) {
return $query->whereHas('status', function ($query) {
$query->where('is_end', '=', 0);
})->orWhere('id', $state);
}
)->searchable()
->optionsLimit(10)->reactive()
->preload(),
12 Replies
when is the error triggered
cc @kennethsese
On the second open to any record with select
ok
I'll take a look
I can't reproduce this with a similar set up. What is reacting to the Select? Have you tried disabling the methods one by one to see if one of those triggers the issue
searchable()
, preload()
, etc. And do you know what version of Filament you were on previously?Does it not show even with a regular select?
Just opening the second record will trigger the issue,
The third record will trigger two issues and so on.
Not for me. To be clear when you say "opening a second/third record" you mean you are on the List page, you click on a record to open View/Edit it...the first record you open is fine, but when you go back in the browser and then open a second record you get the error. Am I understanding that correctly?
If so, are you using a modal to view/edit?
Yes, just viewing the second record in edit mode triggered the issue. I will try to provide a repository later on and get back to you.
Thanks for the clarification. And modal?
A repo would be fantastic
Ok... you must be using a modal. I just changed to a modal and got the error
From what I can tell this has been present since at least 2.17.00. Has it been a while since you updated? It's only present in modals though.
does it actually affect functionality?
sorry for @ing you @kennethsese, thought it might be related to your PRs
It doesn't seem to affect functionality, but @malzariey please confirm. Everything is loading and searching for me. One of those weird alpine/livewire issues
Functionally it works without an issue. I believe that listeners dont get distroyed with the element. As they keep duplicating with every modal I edit.
And yes I still get another simaler issue with repeaters as well once items get deleted
There was a similar problem with the toggle icon column that listeners weren’t getting destroyed. In that case it really affected functionality. It required a bit of a rewrite to get working properly. The same type of rewrite might be needed here.