@homecode/ui 4.20.3 → 4.20.5

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.
@@ -72,10 +72,9 @@ function Autocomplete(props) {
72
72
  // @ts-ignore
73
73
  const inputRef = useRef(null);
74
74
  const isOpen = options.length > 0;
75
- const classes = cn(S.root, className);
75
+ const classes = cn(S.root, className, popupProps.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?.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 || isOpen)
137
+ if (isFocusedRef.current)
139
138
  fetchOptions(value);
140
139
  }, [value]);
141
140
  const optionsList = useMemo(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.20.3",
3
+ "version": "4.20.5",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "jest",