Closed Plytas closed 1 year ago
Hey @Plytas! We're sorry to hear that you've hit this issue. 💛
However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?
We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.
Thank you for providing reproduction steps! Reopening the issue now.
@Plytas Hi. This is a known issue with Livewire. Follow along on this thread as well as temporary fix you can implement: https://github.com/filamentphp/filament/issues/7129
Thanks you, will close this in favor of #7129
Package
filament/filament
Package Version
v3.0.34
Laravel Version
v10.20.0
Livewire Version
v3.0.0
PHP Version
PHP 8.2.7
Problem description
Ran into issue with TernaryFilter, which also applies to TrashedFilter that's present in https://github.com/filamentphp/demo. This only started breaking since version 3.0.28 when filter query params were introduced. This does not happen on https://demo.filamentphp.com because it's still on version 3.0.27.
Refreshing a page with filters enabled and then trying to reset filters will put
null
in query parameter causing filter to treat it astrue
.Recording of this issue:
https://github.com/filamentphp/filament/assets/17316322/fe7966fe-e61b-4835-8009-75025c6ba887
Notice that when applying With deleted records there's a first row
Dr. Dustin ...
that's actually soft deleted. After reseting filters and refreshing page the filter gets applied again. This does not happen if you don't refresh the page in step5
. In that case reseting filters removes query param completely. I believe what happens is that state value becomes a string"null"
and it becomes true when being cast to bool.Expected behavior
Expected filter reset to use null state.
Steps to reproduce
Reproduction repository
https://github.com/Plytas/demo
Relevant log output
No response