From 4fe8f37c7a5f4c97828af9474af824d354c2a6af Mon Sep 17 00:00:00 2001 From: shinya Date: Thu, 17 Jul 2025 00:02:16 +0800 Subject: [PATCH] fix: keep secondary selection unchange when changing primary selection --- src/app/douban/page.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/app/douban/page.tsx b/src/app/douban/page.tsx index ee819da..ab9d4fe 100644 --- a/src/app/douban/page.tsx +++ b/src/app/douban/page.tsx @@ -226,20 +226,13 @@ function DoubanPageClient() { // 处理选择器变化 const handlePrimaryChange = useCallback( (value: string) => { - // 立即设置loading状态 setLoading(true); - // 批量更新状态 - React 18会自动批处理这些更新 setPrimarySelection(value); - // 电影类型时,重置二级选择器为第一个选项 - if (type === 'movie') { - setSecondarySelection('全部'); - } }, [type] ); const handleSecondaryChange = useCallback((value: string) => { - // 立即设置loading状态 setLoading(true); setSecondarySelection(value); }, []);