Loding Table
Good morning guys!
Is there any way to put a loading indicator in the filament tables, for when there is a delay? I didn't find anything in the documentation and deferLoading only does a "loading" when you enter the screen for the first time, if you do any other action in modal or for example it refreshes the table there is no loading indicator
21 Replies
https://filamentphp.com/docs/3.x/support/blade-components/loading-indicator
You can in theory add a custom render to render this in the table footer and position it with a div absolute etc etc
I did similar with forms
https://v2.filamentphp.com/tricks/forms-loading-inidicator
Filament
Forms Loading Inidicator by Tony Partridge - Tricks - Filament
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
this indication working in table?
Yes... wire loading works as per livewire, see the livewire docs if unsure
I'm try but not showing loading wen filter or execute some action ->contentFooter(View::make('tables.loading'));
You can also see:
https://github.com/filamentphp/filament/discussions/10156
GitHub
Loading Indicators on change table page · filamentphp filament · Di...
I created a table with a lot of data and if I change page, it takes some time to refresh the data. During this time I can't see any loading indicator. How can I show it?
You can use ->deferLoading() in you config for tables or just that one table, it will have loading indicator (like skeleton). But page will be instantly opened
In my case, I need to show the loading if, for example, a user clicks on an action and then closes the modal, while it loads the component where it can generate an indispensability of clicks, I wanted to have this loading
Personally I use this blade view to show a loading indicator at the page top when ever a livewire loading is happening:
It's taken from this site:
https://filamentglow.com
Do have defer loading everywhere with that...or does that not matter ?
Id probably just use a renderHook to include a livewire component with wire:loading that way it wouldn’t matter what the request or life cycle is and would just always show any time any livewire request is made. I think there’s even a plugin for it already.
Most of my tables are
->deferLoading()
and it is showing only after loadings longer than 2 seconds
adjust this line for a faster display:
else this.delayTimer = setTimeout(() => this.value = true, 100);
// 2000 set to 1000Wire loading has a default delay built in. If the request takes less than, iirc 200 ms, wire loading will not be triggered at the livewire/alpine level.
Thanks..
What location do you hook into?
GLOBAL_SEARCH_START
feels like the obvious place, but it doesn't show on my current project.
TOPBAR_START
and TOPBAR_END
are both the same location, but its quite close to the logo.FOOTER
it is an absolute element so just put it outside any relative element
try to make some long loading actions like switcing tabs or filtershmmm....
FOOTER
doesn't show up.
Perhaps something else I've got blocking it.Are you using the blade view from my code or from the website as the website one has some missing styles as the bg
I've tried both.
It appears to be stuck behind other elements, including the logo.
If I fix
x-show="true"
, and then in the console run : document.querySelector('[x-show="true"]').style.zIndex = '99999999';
then I can see it.
But adjusting the zIndex in the class has no effect. Also tried disabling the custom theme and any other lugins I could.
Although when I do get through running the console commands, the positioning doesn't look right:
it is working fine for me with no theme layout changes, so it is probably just your theme layout changes issue
Probably...going to look at this when I have a bit more time!
@Mohamed Ayaou, appreciate your input though.