indicator-ui 0.0.64 → 0.0.66

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/index.js CHANGED
@@ -9545,12 +9545,13 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
9545
9545
  requestPromise = loadMoreOptions && loadMoreOptions(optionsState?.length || 0, searchingString);
9546
9546
  requestPromiseRef.current = requestPromise;
9547
9547
  const newOptions = await requestPromise;
9548
- if (newOptions !== undefined) {
9549
- setOptionsState(prevState => {
9550
- requestPromiseRef.current = undefined;
9548
+ setOptionsState(prevState => {
9549
+ requestPromiseRef.current = undefined;
9550
+ if (newOptions !== undefined) {
9551
9551
  return [...prevState, ...newOptions];
9552
- });
9553
- }
9552
+ }
9553
+ return prevState;
9554
+ });
9554
9555
  };
9555
9556
  const onScrollToBottom = async () => {
9556
9557
  onBottomScroll && onBottomScroll();