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>'),
);