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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "downshift",
3
- "version": "7.3.0",
3
+ "version": "7.3.2",
4
4
  "description": "🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.",
5
5
  "main": "dist/downshift.cjs.js",
6
6
  "react-native": "dist/downshift.native.cjs.js",
@@ -2758,7 +2758,7 @@ function useControlledReducer(reducer, initialState, props) {
2758
2758
  }
2759
2759
  previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
2760
2760
  }
2761
- });
2761
+ }, [props.selectedItem, state.selectedItem]);
2762
2762
  return [getState(state, props), dispatch];
2763
2763
  }
2764
2764
 
@@ -3626,7 +3626,7 @@ function useMultipleSelection(userProps) {
3626
3626
  // Effects.
3627
3627
  /* Sets a11y status message on changes in selectedItem. */
3628
3628
  preact.useEffect(function () {
3629
- if (isInitialMountRef.current) {
3629
+ if (isInitialMountRef.current || false) {
3630
3630
  return;
3631
3631
  }
3632
3632
  if (selectedItems.length < previousSelectedItemsRef.current.length) {
@@ -2745,7 +2745,7 @@ function useControlledReducer(reducer, initialState, props) {
2745
2745
  }
2746
2746
  previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
2747
2747
  }
2748
- });
2748
+ }, [props.selectedItem, state.selectedItem]);
2749
2749
  return [getState(state, props), dispatch];
2750
2750
  }
2751
2751
 
@@ -3613,7 +3613,7 @@ function useMultipleSelection(userProps) {
3613
3613
  // Effects.
3614
3614
  /* Sets a11y status message on changes in selectedItem. */
3615
3615
  useEffect(function () {
3616
- if (isInitialMountRef.current) {
3616
+ if (isInitialMountRef.current || false) {
3617
3617
  return;
3618
3618
  }
3619
3619
  if (selectedItems.length < previousSelectedItemsRef.current.length) {
@@ -3054,7 +3054,7 @@
3054
3054
  }
3055
3055
  previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
3056
3056
  }
3057
- });
3057
+ }, [props.selectedItem, state.selectedItem]);
3058
3058
  return [getState(state, props), dispatch];
3059
3059
  }
3060
3060
 
@@ -3922,7 +3922,7 @@
3922
3922
  // Effects.
3923
3923
  /* Sets a11y status message on changes in selectedItem. */
3924
3924
  preact.useEffect(function () {
3925
- if (isInitialMountRef.current) {
3925
+ if (isInitialMountRef.current || false) {
3926
3926
  return;
3927
3927
  }
3928
3928
  if (selectedItems.length < previousSelectedItemsRef.current.length) {