@homecode/ui 4.20.3 → 4.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -75,7 +75,6 @@ function Autocomplete(props) {
|
|
|
75
75
|
const classes = cn(S.root, className);
|
|
76
76
|
const handleFocus = (e) => {
|
|
77
77
|
isFocusedRef.current = true;
|
|
78
|
-
fetchOptions(searchValue);
|
|
79
78
|
inputProps?.onFocus?.(e);
|
|
80
79
|
};
|
|
81
80
|
const handleBlur = (e) => {
|
|
@@ -96,7 +95,7 @@ function Autocomplete(props) {
|
|
|
96
95
|
onSelect(value);
|
|
97
96
|
// set input caret to the end
|
|
98
97
|
requestAnimationFrame(() => {
|
|
99
|
-
const input = inputRef.current
|
|
98
|
+
const input = inputRef.current;
|
|
100
99
|
if (!input)
|
|
101
100
|
return;
|
|
102
101
|
input.focus();
|
|
@@ -135,7 +134,7 @@ function Autocomplete(props) {
|
|
|
135
134
|
useEffect(() => {
|
|
136
135
|
setSearchValue(value);
|
|
137
136
|
setOptions([]);
|
|
138
|
-
if (isFocusedRef.current
|
|
137
|
+
if (isFocusedRef.current)
|
|
139
138
|
fetchOptions(value);
|
|
140
139
|
}, [value]);
|
|
141
140
|
const optionsList = useMemo(() => {
|