© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
23 replies
JimKarvo

Pagination urls above the table or scroll up after change page

Hello,

After I click at the next page on pagination, and the page is loaded it is not scrolling up to the first result of the table.

Is it possible to achieve this?

Also is it possible to have the paginated links at the top of the table, and not only at the bottom?

Thank you!
Solution
Add this to a service provider or extract the js to your own script if you’re using a custom js file in filament.

Filament::registerRenderHook(
                'scripts.end',
                fn (): string => new HtmlString('<script>document.addEventListener("click", function(e) {if (e?.target?.closest("button,a")?.classList.contains("filament-tables-pagination-item")){window.scrollTo({top: 0, behavior: "smooth"});}});</script>'),
            );
Filament::registerRenderHook(
                'scripts.end',
                fn (): string => new HtmlString('<script>document.addEventListener("click", function(e) {if (e?.target?.closest("button,a")?.classList.contains("filament-tables-pagination-item")){window.scrollTo({top: 0, behavior: "smooth"});}});</script>'),
            );
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Pagination applies to multiple table after page refresh
FilamentFFilament / ❓┊help
2y ago
Table Pagination - Jump to page
FilamentFFilament / ❓┊help
2y ago
Displaying filters above or below the table content
FilamentFFilament / ❓┊help
3y ago
Scroll to top on pagination select after next page data is received
FilamentFFilament / ❓┊help
3y ago