F
Filament6mo ago
nighty

get new (changed) Pagination Value from inside a Resource

i want to store the new selected pagination value from a table inside a resource ... i have no clue how to access the newly selected pages count from that resource. Maybe someone can point me in the right direction? thank you
Solution:
sorry for the delay.. in your ListPage you can use this ```php public function updatedTableRecordsPerPage(): void {...
Jump to solution
4 Replies
LeandroFerreira
LeandroFerreira6mo ago
I think you can inject $livewire and use $livewire->getTableRecordsPerPage()
nighty
nightyOP6mo ago
good hint .... i tried, but is always null .... also tried with get closure seems the updated value is not available meanwhile i tried a different solution, the values is stored in the session - problem here is, the form will not be reloaded, it works as soon i klick in the same resource on any position that resends the form, but not without reloading the form will not be reloaded -> when you select a different page count on the pagination i think .... i have to intercept the ajax call which updates the table -> feels like this would be the perfect position for this case ... but i cannot find any way to do things like this i think something like an event is needed when the select "items per Page" is changed
Solution
LeandroFerreira
LeandroFerreira6mo ago
sorry for the delay.. in your ListPage you can use this
public function updatedTableRecordsPerPage(): void
{
$recordsPerPage = $this->getTableRecordsPerPage();
}
public function updatedTableRecordsPerPage(): void
{
$recordsPerPage = $this->getTableRecordsPerPage();
}
nighty
nightyOP6mo ago
Thank you Leandro ... this was exactly what i needed ....thank you and your collegues for the great job to creating filament....
Want results from more Discord servers?
Add your server