From d747233721da7c476b78d8265f5dbf0dfeb2e391 Mon Sep 17 00:00:00 2001 From: Rama Priyanto Date: Wed, 9 Jul 2025 14:22:52 +0700 Subject: [PATCH] fix:article search by category --- components/table/article-table.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/components/table/article-table.tsx b/components/table/article-table.tsx index 4b44ca7..cae7cb7 100644 --- a/components/table/article-table.tsx +++ b/components/table/article-table.tsx @@ -129,14 +129,12 @@ export default function ArticleTable() { useEffect(() => { initState(); - }, [ - page, - showData, - startDateValue, - selectedCategories, - articleDate, - selectedUsers, - ]); + }, [page, showData, startDateValue]); + + useEffect(() => { + setPage(1); + initState(); + }, [selectedCategories, selectedUsers, articleDate]); useEffect(() => { getCategories();