filament
filament copied to clipboard
Looping Requisitions when filtering through Toggleable Columns in a Table
Package
filament/filament
Package Version
v2.12.16
Laravel Version
v9.14.0
Livewire Version
v2.10.5
PHP Version
8.0.2
Bug description
In my UserResource I have a Table that consists of up to 8 columns, with 5 of them being toggleable.
Here's the code for the 5 toggleable ones:
Also, I have filters for 4 of these columns, excluding the teams.
Here's the code for the filters:
Whenever I toggle on any of the toggleable columns and filter through any of them, there's a high chance that I'll trigger some sort of Requisition Loop, where the table will blink every few ms, and it'll keep updating itself.
Here's a screenshot of how many requisitions I've got in just a few seconds after filtering through the table with the toggleable columns on:
When this bug happens, the only way to stop the requisition loop is to refresh the page, as un-filtering or toggling off the columns will still cause the loop to happen.
So far, the only solution I've found was to remove the Toggleable hook in these columns. This way, I can filter through them without any issues.
Also, at first the possible culprit was Laragon, but I'm testing it now with Docker and Laradock installed directly into WSL2, and the loop unfortunately still happens.
Thanks in advance for all the support given!
Steps to reproduce
Step 1. Toggle some or all of the columns on:
Step 2. Filter through any of the toggleable columns:
Step 3. In order to stop the loop, refresh the page.
It's also important to mention that the looping bug isn't happening all times, but I can reproduce it almost every time.
Relevant log output
No response
Please set up a repo that I can use to reproduce this issue, with a database seeder
Hello dan! Thanks for the very fast reply!
Sure! Here's the repo: https://github.com/graphiscomunicacao/lms-pro
Since the Admin Panel is in English, the UserResource is in the Navigation Group GERENCIAR USUÁRIOS, called Usuários
I've also encountered this issue when toggling columns and then searching the table.
@RivnatZille, I can't reproduce the issue anymore (also with your provided repository).
Could you check if the issue still occurs with the latest version of Filament?
Maybe it's our new wire:key elements
That's my thought as well, but not 100% sure.
I also tried reproducing with an older version of Filament, but maybe I missed something
Didn't you experience this issue yourself in your own app?
Uh yeah, I did. 😅 But it was locally so maybe I didn't pull in the right (broken) version today.
Okay, finally I've been able to reproduce this issue again on the latest version of Filament.
Having a really hard time reproducing this issue at the moment. Maybe it actually is fixed now. Since @RivnatZille hasn't replied, we could close this issue until someone (like me) runs into it again, @danharrin?
Hi everyone!
Sorry I didn't answer earlier, I've been very busy working on another project, so I didn't had the time to test it out for these past weeks. I'll update Filament and try it out as soon as I can.
Thanks for taking a look at it!
No problem, @RivnatZille. Let us know if you run into the problem again, then we'll reopen the issue. Will close it for now as I'm no longer experiencing the bug.
Hey guys! First of all, thanks for all the replies on the issue. I was finally able test out the Filament project, and even with Filament's v2.15.32 version, I'm still able to reproduce the looping requisitions bug. I've followed the same steps as before, by toggling on some columns that are hidden by default, and right after that filtering by any random column. As soon as the table was filtered, the looping requisitions began again, requiring me to reload the page in order for it to stop.
Hmm, was that with your reproduction repository you posted here?
I had difficulty reproducing the issue in my own project, but will reopen this issue if you're still experiencing it! 👍
Yes, I was able to reproduce it with the repository that I've posted.
Thanks for reopening the issue!
Hey there. I've just found this issue In the official demo (demo.filamentphp.com). The steps to reproduce it are:
- Login
- Go to Brands
- Click a brand
- Scroll to Products
- Click the Toggle Columns button
- Toggle Security stock or Publish Date on (they were off for me)
- Sort the table (clicking in the column header) by any column
- The loop starts
The loop stops with a reload or if any column is then turned on or off
I've made a GIF of this procedure you can see here (can't seem to embedd it): https://i.imgur.com/zCCBeTo.gif
I'm using Chrome 105.0.5195.127.
Hope this helps.
Should be fixed by #4196. Please check in the next Filament version. Let me know either way.
Hey Dan! I've updated Filament and tested out the tables many times, and wasn't able to reproduce the bug anymore! It's fixed!
Thank you so much! Cheers!