downshift 7.3.1 → 7.3.2

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.
@@ -2795,7 +2795,7 @@ function useControlledReducer(reducer, initialState, props) {
2795
2795
  }
2796
2796
  previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
2797
2797
  }
2798
- });
2798
+ }, [props.selectedItem, state.selectedItem]);
2799
2799
  return [getState(state, props), dispatch];
2800
2800
  }
2801
2801
 
@@ -2782,7 +2782,7 @@ function useControlledReducer(reducer, initialState, props) {
2782
2782
  }
2783
2783
  previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
2784
2784
  }
2785
- });
2785
+ }, [props.selectedItem, state.selectedItem]);
2786
2786
  return [getState(state, props), dispatch];
2787
2787
  }
2788
2788
 
@@ -2717,7 +2717,7 @@ function useControlledReducer(reducer, initialState, props) {
2717
2717
  }
2718
2718
  previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
2719
2719
  }
2720
- });
2720
+ }, [props.selectedItem, state.selectedItem]);
2721
2721
  return [getState(state, props), dispatch];
2722
2722
  }
2723
2723
 
@@ -4107,7 +4107,7 @@
4107
4107
  }
4108
4108
  previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
4109
4109
  }
4110
- });
4110
+ }, [props.selectedItem, state.selectedItem]);
4111
4111
  return [getState(state, props), dispatch];
4112
4112
  }
4113
4113