© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
Mikail

deferLoading

Is there any simple way to actually deferLoading on the table data until filter is applied?
Solution
You could modify the table query until a filter is selected:

Something like this (you need to figure out
check_if_empty
check_if_empty


->modifyQueryUsing(fn ($query, $livewire) => $query->when(
  check_if_empty($livewire->tableFilters), 
  fn ($query) => $query->whereRaw('1 = 0')
))
->modifyQueryUsing(fn ($query, $livewire) => $query->when(
  check_if_empty($livewire->tableFilters), 
  fn ($query) => $query->whereRaw('1 = 0')
))
Jump to solution
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

deferLoading Placeholder Text
FilamentFFilament / ❓┊help
3y ago
deferLoading by default?
FilamentFFilament / ❓┊help
3y ago
Table deferLoading() and Tests
FilamentFFilament / ❓┊help
12mo ago
Table `deferLoading()` calling `loadTable` method twice.
FilamentFFilament / ❓┊help
2y ago