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