© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
Stewart

Reset Table Widget Pagination

I have encountered an issue when filtering a custom dashboard page in my Filament panel.

When I apply a filter I would like the pagination to return to the first page / be reset.

I believe I have tried all of the options available to me but it appears that I am unable to access the correct pagination instance.

A
SiteLiaisonManagement
SiteLiaisonManagement
class that extends the Filament Dashboard class is used to form the page. Within this class there is an getHeaderActions call which defines a custom
ResetFilterAction
ResetFilterAction
action and a Filament
FilterAction
FilterAction
action. When either of these header actions are submitted, I would like the pagination on the table widget to reset to the first page. The table in question is included as a widget manually within the
SiteLiaisonManagement
SiteLiaisonManagement
class using the
getWidgets
getWidgets
method.

I have tried using the Livewire
resetPage
resetPage
and s
etPage(1)
etPage(1)
methods from the
WithPagination
WithPagination
trait without success. If I debug Livewire’s
$paginators
$paginators
array it is empty when either the
ResetFilterAction
ResetFilterAction
action or
FilterAction
FilterAction
action are first called. This is the same whether I use
queryStringIdentifier
queryStringIdentifier
method on the table instance or not. If I dump again after the action has taken place, I have been able to set (what appears to be) the correct
paginator
paginator
page number to 1 but neither the table widget or page URL updates.

Another avenue I have explored is using an event that dispatches when the header action is completed but this has also been unsuccessful.

Any help is certainly appreciated!
Solution
This is now fixed. In my case, I had made a mistake extending the
TableWidget
TableWidget
class. Once fixed, I was able to dispatch an event from the header filter action and listen to that elsewhere in the codebase. Once triggered, the listener can correctly call
resetPage
resetPage
on the table widget.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Pagination Index in Table Widget?
FilamentFFilament / ❓┊help
3y ago
Pagination not showing in dashboard table widget
FilamentFFilament / ❓┊help
3y ago
Reset table pagination after reactive property changes
FilamentFFilament / ❓┊help
2y ago
Table widget
FilamentFFilament / ❓┊help
15mo ago