How to Prevent Laravel filament table in a resource from loading until a filter action is initiated
I have a database table with a lot of data. I don't want to load all the data into the table in a resource. I want to prevent the table in a resource from loading data as it is done by default in filament resource. I want to use a table filter to rather load the table content. I want the page to behave like a search page with criteria. How do I get this done without creating a custom page? I thought using the deferLoading() would solve the problem but it didn't. I tried to modify the table query which did what i wanted but i realized that when a filter is applied it doesn't get a data although it exists. I checked and noticed that filters append it query to the table query. So this couldn't solve the problem
1 Reply
I currently face a similar issue where I added ordering at the original query in
getEloquentQuery()
method in the resource.
I can't use the capability of sortable columns in the grid, because it is overrided by the modified query