downshift 7.3.0 → 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
 
@@ -3663,7 +3663,7 @@ function useMultipleSelection(userProps) {
3663
3663
  // Effects.
3664
3664
  /* Sets a11y status message on changes in selectedItem. */
3665
3665
  react.useEffect(function () {
3666
- if (isInitialMountRef.current) {
3666
+ if (isInitialMountRef.current || false) {
3667
3667
  return;
3668
3668
  }
3669
3669
  if (selectedItems.length < previousSelectedItemsRef.current.length) {
@@ -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
 
@@ -3650,7 +3650,7 @@ function useMultipleSelection(userProps) {
3650
3650
  // Effects.
3651
3651
  /* Sets a11y status message on changes in selectedItem. */
3652
3652
  useEffect(function () {
3653
- if (isInitialMountRef.current) {
3653
+ if (isInitialMountRef.current || false) {
3654
3654
  return;
3655
3655
  }
3656
3656
  if (selectedItems.length < previousSelectedItemsRef.current.length) {
@@ -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
 
@@ -3597,7 +3597,7 @@ function useMultipleSelection(userProps) {
3597
3597
  // Effects.
3598
3598
  /* Sets a11y status message on changes in selectedItem. */
3599
3599
  react.useEffect(function () {
3600
- if (isInitialMountRef.current) {
3600
+ if (isInitialMountRef.current || true) {
3601
3601
  return;
3602
3602
  }
3603
3603
  if (selectedItems.length < previousSelectedItemsRef.current.length) {
@@ -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
 
@@ -4975,7 +4975,7 @@
4975
4975
  // Effects.
4976
4976
  /* Sets a11y status message on changes in selectedItem. */
4977
4977
  react.useEffect(function () {
4978
- if (isInitialMountRef.current) {
4978
+ if (isInitialMountRef.current || false) {
4979
4979
  return;
4980
4980
  }
4981
4981
  if (selectedItems.length < previousSelectedItemsRef.current.length) {