F
Filament3mo ago
kool

loading indicator between table tabs

Any ideas about adding a loading indicator when switching between table tabs
7 Replies
LeandroFerreira
LeandroFerreira3mo ago
What is the goal?
kool
koolOP3mo ago
I have a resource that display orders data with three different tabs. \Each tab has a set of data displayed based on conditions and ordered based on some criteria. The data takes time to load, which is my concern to display some indicator the user know if they clicked on the tab and it fetching the data
kool
koolOP3mo ago
No description
LeandroFerreira
LeandroFerreira3mo ago
try this in your ListPage
use Filament\Tables\View\TablesRenderHook;
use Filament\Support\Facades\FilamentView;
use Illuminate\Support\Facades\Blade;

public function getView(): string
{
FilamentView::registerRenderHook(
TablesRenderHook::TOOLBAR_END,
fn (): string => Blade::render('<x-filament::loading-indicator wire:loading class="h-5 w-5" />')
);

return parent::getView();
}
use Filament\Tables\View\TablesRenderHook;
use Filament\Support\Facades\FilamentView;
use Illuminate\Support\Facades\Blade;

public function getView(): string
{
FilamentView::registerRenderHook(
TablesRenderHook::TOOLBAR_END,
fn (): string => Blade::render('<x-filament::loading-indicator wire:loading class="h-5 w-5" />')
);

return parent::getView();
}
kool
koolOP3mo ago
❤️
No description
kool
koolOP3mo ago
Thank you so much @Leandro Ferreira, I appreciate your time
manojhl
manojhl3mo ago
Is there a render hook to add the loading indicator on the entire table with a timeout option? making sure user can't click on other tabs or fitlers while fetching this data?
Want results from more Discord servers?
Add your server