© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Vulture

How to hide TableWidget if getTableQuery has no data

Hello, i use HeaderWidgets on Resource Edit Page, i need to hide TableWidget when no data, how to make it ?


// EventResource/EditEvent.php
protected function getHeaderWidgets(): array
    {
        return [
            ProcessOverview::class
        ];
    }
protected function getHeaderWidgets(): array
    {
        return [
            ProcessOverview::class
        ];
    }


// GetTableQuery from ProcessOverview TableWidget.
 protected function getTableQuery(): Builder
    {
        return Process::query()->where('event_id', $this->record->id)
                ->with(['event', 'admin'])
                ->where('status',ProcessStatusEnum::STARTED->value)
                ->orderBy('created_at','DESC')
                ->latest();
    }
 protected function getTableQuery(): Builder
    {
        return Process::query()->where('event_id', $this->record->id)
                ->with(['event', 'admin'])
                ->where('status',ProcessStatusEnum::STARTED->value)
                ->orderBy('created_at','DESC')
                ->latest();
    }
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Returning Array in getTableQuery on the TableWidget
FilamentFFilament / ❓┊help
3y ago
If Infolist Repeatable Entry has no data I want to show "No Data Found"
FilamentFFilament / ❓┊help
3y ago
Relation Manager Hide If No Results
FilamentFFilament / ❓┊help
9mo ago
Refresh TableWidget data after Action
FilamentFFilament / ❓┊help
3y ago