You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a CopyResource with a table that has multiple actions on each row and the ListCopies page has a few tabs that filter what is being shown in the table. If I activate one of the tabs that uses orWhere then click on an action button in one of the rows at the bottom, it will perform the action on the wrong copy.
Expected behavior
With the setup described in the problem description, clicking on the action button should perform the action on the record that had the button.
I realized that when you use orWhere in the tabs, a CancelException is triggered, which causes an unmountTableAction. However, I couldn't find where this exception is being triggered.
@dcaswel I've been tripped up by this before... Just thinking aloud as I haven't tested, but does the problem go away if you change the query like this?
The Laravel docs warn orWhere clauses should always be placed in logical groups. Without doing so, the orWhere you've added might be cancelling out an internal where clause added by Filament.
Package
filament/filament
Package Version
v3.2.110
Laravel Version
v11.21.0
Livewire Version
v3.5.6
PHP Version
PHP 8.3.10
Problem description
I have a CopyResource with a table that has multiple actions on each row and the ListCopies page has a few tabs that filter what is being shown in the table. If I activate one of the tabs that uses
orWhere
then click on an action button in one of the rows at the bottom, it will perform the action on the wrong copy.Expected behavior
With the setup described in the problem description, clicking on the action button should perform the action on the record that had the button.
Steps to reproduce
getTabs()
method and return a tab that usesorWhere
similar to:The attached repo has a README with steps for reproducing this in that project as well as some information I found on a partial cause for the issue.
Reproduction repository (issue will be closed if this is not valid)
https://github.com/dcaswel/filament-issue
Relevant log output
No response
Donate 💰 to fund this issue
The text was updated successfully, but these errors were encountered: