how to hide table records until a filter is applied?
how to hide table records until a filter is applied?
Solution:Jump to solution
```php
->modifyQueryUsing(function(Builder $query, $livewire){
if(!empty($livewire->tableFilters)){
if(...
5 Replies
Solution
i did sth like that
you can dd the $livewire->tableFilters, to use your own filter
the logic is, you check if the user did set the filter, then return something that doesnt have record, in my case i return where id 0, which is nothing
then i return the query if they filter the table
i hope you get the idea
Thanks!
sure, dont forget to make this question as solved
GitHub
Make a table blank · filamentphp filament · Discussion #12386
Package Table builder Package Version 3.2 How can we help you? Is it possible for a table to be blank until a search has been made,. in this table public static function table(Table $table): Table ...