From f64eb2c8d09e7db72bbc2e84abf08e5d64092898 Mon Sep 17 00:00:00 2001 From: fuomag9 <1580624+fuomag9@users.noreply.github.com> Date: Fri, 27 Feb 2026 18:05:15 +0100 Subject: [PATCH] fix: sync search state on navigation; move pagination before create form in access-lists Co-Authored-By: Claude Sonnet 4.6 --- .../access-lists/AccessListsClient.tsx | 24 +++++++++---------- app/(dashboard)/audit-log/AuditLogClient.tsx | 3 +++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/(dashboard)/access-lists/AccessListsClient.tsx b/app/(dashboard)/access-lists/AccessListsClient.tsx index 91c38593..82babb69 100644 --- a/app/(dashboard)/access-lists/AccessListsClient.tsx +++ b/app/(dashboard)/access-lists/AccessListsClient.tsx @@ -122,6 +122,18 @@ export default function AccessListsClient({ lists, pagination }: Props) { ))} + {pageCount > 1 && ( + + + + )} + Create access list @@ -148,18 +160,6 @@ export default function AccessListsClient({ lists, pagination }: Props) { - - {pageCount > 1 && ( - - - - )} ); } diff --git a/app/(dashboard)/audit-log/AuditLogClient.tsx b/app/(dashboard)/audit-log/AuditLogClient.tsx index 995874e1..caddb6ed 100644 --- a/app/(dashboard)/audit-log/AuditLogClient.tsx +++ b/app/(dashboard)/audit-log/AuditLogClient.tsx @@ -24,6 +24,9 @@ export default function AuditLogClient({ events, pagination, initialSearch }: Pr const pathname = usePathname(); const searchParams = useSearchParams(); const [searchTerm, setSearchTerm] = useState(initialSearch); + useEffect(() => { + setSearchTerm(initialSearch); + }, [initialSearch]); const debounceRef = useRef | null>(null); const updateSearch = useCallback(