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
Dan Harrin
Dan Harrin2y ago
when is the error triggered cc @kennethsese
Majid Al Zariey
Majid Al ZarieyOP2y ago
On the second open to any record with select
Dan Harrin
Dan Harrin2y ago
ok
Kenneth Sese
Kenneth Sese2y ago
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?
Majid Al Zariey
Majid Al ZarieyOP2y ago
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.
Kenneth Sese
Kenneth Sese2y ago
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?
Majid Al Zariey
Majid Al ZarieyOP2y ago
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.
Kenneth Sese
Kenneth Sese2y ago
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.
Dan Harrin
Dan Harrin2y ago
does it actually affect functionality? sorry for @ing you @kennethsese, thought it might be related to your PRs
Kenneth Sese
Kenneth Sese2y ago
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
Majid Al Zariey
Majid Al ZarieyOP2y ago
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
Kenneth Sese
Kenneth Sese2y ago
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.

Did you find this page helpful?