How to not display data in widget table except if a filter is selected ?
Hi,
I want to display data only if a filter is selected by user.
If anyone can help me, it will be appreciate !
Thanks for your help !
Solution:Jump to solution
Maybe this?
```php
->modifyQueryUsing(function (Builder $query, Table $table) {
$query->when(! $table->isFiltered(), fn (Builder $query): Builder => $query->whereId(0));
})...
5 Replies
Solution
Maybe this?
Thanks you , i will try !
It work like a charm ! thanks you again !
Now I'm looking to replacing the message : "no record found" to "Select a filter"
Sorry, i've search without the good searchs terms !