Просмотр исходного кода

🐛 fix: Always update `searchValue` during IME composition to enable Chinese input in model search

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
t0ng7u 6 месяцев назад
Родитель
Сommit
196e2a0abb
1 измененных файлов с 0 добавлено и 5 удалено
  1. 0 5
      web/src/hooks/model-pricing/useModelPricingData.js

+ 0 - 5
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 {