@rolster/react-components 18.15.11 → 18.15.12
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.
package/dist/es/index.js
CHANGED
|
@@ -2093,16 +2093,13 @@ function useListControl({ suggestions, formControl }) {
|
|
|
2093
2093
|
}));
|
|
2094
2094
|
}, [state.visible]);
|
|
2095
2095
|
useEffect(() => {
|
|
2096
|
-
if (
|
|
2096
|
+
if (changeInternal.current) {
|
|
2097
2097
|
changeInternal.current = false;
|
|
2098
2098
|
return;
|
|
2099
2099
|
}
|
|
2100
|
-
refresh(collection.current, formControl?.value);
|
|
2101
|
-
}, [formControl?.value]);
|
|
2102
|
-
useEffect(() => {
|
|
2103
2100
|
collection.current = new ListCollection(suggestions);
|
|
2104
2101
|
refresh(collection.current, formControl?.value);
|
|
2105
|
-
}, [suggestions]);
|
|
2102
|
+
}, [suggestions, formControl?.value]);
|
|
2106
2103
|
function refresh(collection, state) {
|
|
2107
2104
|
if (!state) {
|
|
2108
2105
|
return refreshProtected(collection) ? undefined : setValue('');
|
|
@@ -2150,7 +2147,7 @@ function useListControl({ suggestions, formControl }) {
|
|
|
2150
2147
|
event: event,
|
|
2151
2148
|
list: listRef.current
|
|
2152
2149
|
});
|
|
2153
|
-
position.current = newPosition
|
|
2150
|
+
position.current = newPosition ?? 0;
|
|
2154
2151
|
}
|
|
2155
2152
|
}
|
|
2156
2153
|
function navigationElement(event) {
|