Преглед изворни кода

docs: fix the focused (#117)

* fix: 修改avatarCls拼写

* docs(auto-complete): fix the spell of focused

Co-authored-by: wangzhitao <[email protected]>
wangzt-arch пре 4 година
родитељ
комит
882f84c228
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      packages/semi-ui/autoComplete/index.tsx

+ 2 - 2
packages/semi-ui/autoComplete/index.tsx

@@ -388,14 +388,14 @@ class AutoComplete extends BaseComponent<AutoCompleteProps, AutoCompleteState> {
 
     renderOption(option: StateOptionItem, optionIndex: number): React.ReactNode {
         const { focusIndex } = this.state;
-        const isFocusd = optionIndex === focusIndex;
+        const isFocused = optionIndex === focusIndex;
 
         return (
             <Option
                 showTick={false}
                 onSelect={(v: StateOptionItem, e: React.MouseEvent | React.KeyboardEvent) => this.onSelect(v, optionIndex, e)}
                 // selected={selection.has(option.label)}
-                focused={isFocusd}
+                focused={isFocused}
                 onMouseEnter={() => this.foundation.handleOptionMouseEnter(optionIndex)}
                 key={option.key || option.label + option.value + optionIndex}
                 {...option}