Pagination Cursor not working in Filament Tables

Pagination Cursor not working why Filament\Tables\ConcernsCan\PaginateRecords:
public function getTablePage(): int
{
return $this->getPage($this->getTablePaginationPageName());
}
public function getTablePage(): int
{
return $this->getPage($this->getTablePaginationPageName());
}
It expects page to be of type int, but paginateCursor is a string. I don't know if I'm doing something wrong, but it seems like the typing should also have a string type. Making this change to Filament\Tables\ConcernsCan\PaginateRecords and the contract Filament\Tables\Contracts\HasTable directly in the vendor package works perfectly. To get the error, just include:
public static function table(Table $table): Table
{
return $table
->columns([
//
])
->filters([
//
])
->recordActions([
])
->toolbarActions([
])->paginationMode(PaginationMode::Cursor);
}
public static function table(Table $table): Table
{
return $table
->columns([
//
])
->filters([
//
])
->recordActions([
])
->toolbarActions([
])->paginationMode(PaginationMode::Cursor);
}
LOG:
[previous exception] [object] (TypeError(code: 0): Filament\\Resources\\Pages\\ListRecords::getTablePage(): Return value must be of type int, string returned at C:\\laragon2\\www\\admin.importparts\\vendor\\filament\\tables\\src\\Concerns\\CanPaginateRecords.php:68)
[stacktrace]
[previous exception] [object] (TypeError(code: 0): Filament\\Resources\\Pages\\ListRecords::getTablePage(): Return value must be of type int, string returned at C:\\laragon2\\www\\admin.importparts\\vendor\\filament\\tables\\src\\Concerns\\CanPaginateRecords.php:68)
[stacktrace]
Versions:
PHP 8.4.3
PHP 8.4.3
Filament v4.0.3
Filament v4.0.3
Laravel v12.25.0
Laravel v12.25.0
Liverwire v3.6.4
Liverwire v3.6.4
I will install everything today, the versions must be the latest
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?