F
Filament2w ago
aksh

I used a checkbox in the filter and it has default true.

Hi everyone, I used a checkbox in the filter and it has default true. but I want to disable or hide it so the user cannot uncheck it. I am using filament v3 ->filters([ Filter::make('selected_location') ->query(function ($query) use ($selectedLocation) { if ($selectedLocation) { return $query->where('locations_id', $selectedLocation); } return $query; })->default(true), )}
Solution:
If you only want to show certain records on the table you can modify the table query to do so.
Jump to solution
3 Replies
Solution
BlackShadow
BlackShadow2w ago
If you only want to show certain records on the table you can modify the table query to do so.
BlackShadow
BlackShadow2w ago
Your question is a bit odd since you talk about selectedRecords but want to have true as default.
aksh
aksh2w ago
Thank you, sir. It's fixed it.