@rolster/react-components 18.15.10 → 18.15.11

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
@@ -2075,8 +2075,6 @@ function useListControl({ suggestions, formControl }) {
2075
2075
  });
2076
2076
  const collection = require$$0.useRef(new components.ListCollection([]));
2077
2077
  const position = require$$0.useRef(0);
2078
- const initializedState = require$$0.useRef(false);
2079
- const initializedCollection = require$$0.useRef(false);
2080
2078
  const changeInternal = require$$0.useRef(false);
2081
2079
  const protectedValue = require$$0.useRef();
2082
2080
  require$$0.useEffect(() => {
@@ -2097,11 +2095,7 @@ function useListControl({ suggestions, formControl }) {
2097
2095
  }));
2098
2096
  }, [state.visible]);
2099
2097
  require$$0.useEffect(() => {
2100
- if (!initializedState.current || !initializedCollection.current) {
2101
- initializedState.current = true;
2102
- return;
2103
- }
2104
- if (changeInternal.current) {
2098
+ if (!changeInternal.current) {
2105
2099
  changeInternal.current = false;
2106
2100
  return;
2107
2101
  }
@@ -2109,10 +2103,6 @@ function useListControl({ suggestions, formControl }) {
2109
2103
  }, [formControl?.value]);
2110
2104
  require$$0.useEffect(() => {
2111
2105
  collection.current = new components.ListCollection(suggestions);
2112
- if (!initializedCollection.current || !initializedState.current) {
2113
- initializedCollection.current = true;
2114
- return;
2115
- }
2116
2106
  refresh(collection.current, formControl?.value);
2117
2107
  }, [suggestions]);
2118
2108
  function refresh(collection, state) {