F
Filament2y ago
Medo

How to not show any table data unless the user selects from filters first

How to not show any table data unless the user selects from filters first
6 Replies
fikurimax
fikurimax2y ago
I guess you can set the default value on the filter, but make sure the default value is not available on the filter itself
fikurimax
fikurimax2y ago
like this
Medo
MedoOP2y ago
@fikurimax Thanks for your reply, but options i don't want to set default values and want use select then show data on table based on filter applied
Medo
MedoOP2y ago
@archilex Thank you , but do you think there's better way to do this ?
Kenneth Sese
Kenneth Sese2y ago
Currently that seems to be the best way. You have to intercept the tableQuery on boot so it won’t load any models and that function is really the only place to do that. You might be able to try submit a PR to core to expose a more elegant API, but I don’t think the team will accept it. I’ve only seen it be asked 2-3 times, so it’s not a common use case, and since the solution in the thread exists, it’s probably the way to go.

Did you find this page helpful?