From 196e2a0abb39038bdf119d62648ddede5a0f4486 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Tue, 12 Aug 2025 23:37:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Always=20update=20`search?= =?UTF-8?q?Value`=20during=20IME=20composition=20to=20enable=20Chinese=20i?= =?UTF-8?q?nput=20in=20model=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: • Removed early return in `handleChange` that blocked controlled value updates while an Input Method Editor (IME) was composing text. • Ensures that Chinese (and other IME-based) characters appear immediately in the “Fuzzy Search Model Name” field. • No change to downstream filtering logic—`searchValue` continues to drive model list filtering as before. Files affected: web/src/hooks/model-pricing/useModelPricingData.js --- web/src/hooks/model-pricing/useModelPricingData.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/web/src/hooks/model-pricing/useModelPricingData.js b/web/src/hooks/model-pricing/useModelPricingData.js index c285cf4d..d209089c 100644 --- a/web/src/hooks/model-pricing/useModelPricingData.js +++ b/web/src/hooks/model-pricing/useModelPricingData.js @@ -211,9 +211,6 @@ export const useModelPricingData = () => { }; const handleChange = (value) => { - if (compositionRef.current.isComposition) { - return; - } const newSearchValue = value ? value : ''; setSearchValue(newSearchValue); }; @@ -231,9 +228,7 @@ export const useModelPricingData = () => { const handleGroupClick = (group) => { setSelectedGroup(group); - // 同时将分组过滤设置为该分组 setFilterGroup(group); - if (group === 'all') { showInfo(t('已切换至最优倍率视图,每个模型使用其最低倍率分组')); } else {