F
Filament7mo 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
BlackShadow7mo ago
If you only want to show certain records on the table you can modify the table query to do so.
BlackShadow
BlackShadow7mo ago
Your question is a bit odd since you talk about selectedRecords but want to have true as default.
aksh
akshOP7mo ago
Thank you, sir. It's fixed it.
Want results from more Discord servers?
Add your server