F
Filamentβ€’5mo ago
ericmp

How to disable Per page -> All

I want, in all of my filament tables, disable the ability to show all the records. In tables with 100 records it's fine, but when the table is holding thousands of records, it makes the browser to run out of RAM, and my users don't know what is happening. So, how to hide the "all" button globally, so it is applied on all tables at once?
No description
3 Replies
-Ni3K-
-Ni3K-β€’5mo ago
Hey Eric, have you tried something like this public function table(Table $table): Table { return $table ->paginated([10, 25, 50, 100]); } https://filamentphp.com/docs/3.x/tables/advanced
Solution
toeknee
toekneeβ€’5mo ago
see: https://filamentphp.com/docs/3.x/tables/advanced#global-settings
use Filament\Tables\Enums\FiltersLayout;
use Filament\Tables\Table;

Table::configureUsing(function (Table $table): void {
$table
->paginationPageOptions([10, 25, 50]);
});
use Filament\Tables\Enums\FiltersLayout;
use Filament\Tables\Table;

Table::configureUsing(function (Table $table): void {
$table
->paginationPageOptions([10, 25, 50]);
});
ericmp
ericmpOPβ€’5mo ago
i wanted it like toeknee says, so its globally, but thanks πŸ™ thank u πŸ™
Want results from more Discord servers?
Add your server