downshift 5.4.3 → 5.4.7

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.
@@ -51,8 +51,18 @@
51
51
  subClass.__proto__ = superClass;
52
52
  }
53
53
 
54
- function createCommonjsModule(fn, module) {
55
- return module = { exports: {} }, fn(module, module.exports), module.exports;
54
+ function createCommonjsModule(fn, basedir, module) {
55
+ return module = {
56
+ path: basedir,
57
+ exports: {},
58
+ require: function (path, base) {
59
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
60
+ }
61
+ }, fn(module, module.exports), module.exports;
62
+ }
63
+
64
+ function commonjsRequire () {
65
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
56
66
  }
57
67
 
58
68
  var reactIs_development = createCommonjsModule(function (module, exports) {
@@ -236,34 +246,6 @@
236
246
  })();
237
247
  }
238
248
  });
239
- var reactIs_development_1 = reactIs_development.AsyncMode;
240
- var reactIs_development_2 = reactIs_development.ConcurrentMode;
241
- var reactIs_development_3 = reactIs_development.ContextConsumer;
242
- var reactIs_development_4 = reactIs_development.ContextProvider;
243
- var reactIs_development_5 = reactIs_development.Element;
244
- var reactIs_development_6 = reactIs_development.ForwardRef;
245
- var reactIs_development_7 = reactIs_development.Fragment;
246
- var reactIs_development_8 = reactIs_development.Lazy;
247
- var reactIs_development_9 = reactIs_development.Memo;
248
- var reactIs_development_10 = reactIs_development.Portal;
249
- var reactIs_development_11 = reactIs_development.Profiler;
250
- var reactIs_development_12 = reactIs_development.StrictMode;
251
- var reactIs_development_13 = reactIs_development.Suspense;
252
- var reactIs_development_14 = reactIs_development.isAsyncMode;
253
- var reactIs_development_15 = reactIs_development.isConcurrentMode;
254
- var reactIs_development_16 = reactIs_development.isContextConsumer;
255
- var reactIs_development_17 = reactIs_development.isContextProvider;
256
- var reactIs_development_18 = reactIs_development.isElement;
257
- var reactIs_development_19 = reactIs_development.isForwardRef;
258
- var reactIs_development_20 = reactIs_development.isFragment;
259
- var reactIs_development_21 = reactIs_development.isLazy;
260
- var reactIs_development_22 = reactIs_development.isMemo;
261
- var reactIs_development_23 = reactIs_development.isPortal;
262
- var reactIs_development_24 = reactIs_development.isProfiler;
263
- var reactIs_development_25 = reactIs_development.isStrictMode;
264
- var reactIs_development_26 = reactIs_development.isSuspense;
265
- var reactIs_development_27 = reactIs_development.isValidElementType;
266
- var reactIs_development_28 = reactIs_development.typeOf;
267
249
 
268
250
  var reactIs = createCommonjsModule(function (module) {
269
251
 
@@ -271,7 +253,6 @@
271
253
  module.exports = reactIs_development;
272
254
  }
273
255
  });
274
- var reactIs_1 = reactIs.isForwardRef;
275
256
 
276
257
  /*
277
258
  object-assign
@@ -1126,7 +1107,11 @@
1126
1107
  return null;
1127
1108
  }
1128
1109
 
1129
- return el.ownerDocument.defaultView.frameElement;
1110
+ try {
1111
+ return el.ownerDocument.defaultView.frameElement;
1112
+ } catch (e) {
1113
+ return null;
1114
+ }
1130
1115
  }
1131
1116
 
1132
1117
  function isHiddenByFrame(el) {
@@ -1646,7 +1631,12 @@
1646
1631
  }
1647
1632
 
1648
1633
  var nonDisabledNewIndex = getNextNonDisabledIndex(moveAmount, newIndex, itemCount, getItemNodeFromIndex, circular);
1649
- return nonDisabledNewIndex === -1 ? baseIndex : nonDisabledNewIndex;
1634
+
1635
+ if (nonDisabledNewIndex === -1) {
1636
+ return baseIndex >= itemCount ? -1 : baseIndex;
1637
+ }
1638
+
1639
+ return nonDisabledNewIndex;
1650
1640
  }
1651
1641
  /**
1652
1642
  * Returns the next index in the list of an item that is not disabled.
@@ -1921,7 +1911,7 @@
1921
1911
  // See https://github.com/downshift-js/downshift/issues/217 for more info.
1922
1912
 
1923
1913
  if (!isStateToSetFunction && stateToSet.hasOwnProperty('inputValue')) {
1924
- _this.props.onInputValueChange(stateToSet.inputValue, _extends(_extends({}, _this.getStateAndHelpers()), stateToSet));
1914
+ _this.props.onInputValueChange(stateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), stateToSet));
1925
1915
  }
1926
1916
 
1927
1917
  return _this.setState(function (state) {
@@ -1971,7 +1961,7 @@
1971
1961
  // earlier, so we'll call it now that we know what the inputValue state will be.
1972
1962
 
1973
1963
  if (isStateToSetFunction && newStateToSet.hasOwnProperty('inputValue')) {
1974
- _this.props.onInputValueChange(newStateToSet.inputValue, _extends(_extends({}, _this.getStateAndHelpers()), newStateToSet));
1964
+ _this.props.onInputValueChange(newStateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), newStateToSet));
1975
1965
  }
1976
1966
 
1977
1967
  return nextState;
@@ -2126,7 +2116,7 @@
2126
2116
  });
2127
2117
  }
2128
2118
  };
2129
- _this.buttonKeyDownHandlers = _extends(_extends({}, _this.keyDownHandlers), {}, {
2119
+ _this.buttonKeyDownHandlers = _extends({}, _this.keyDownHandlers, {
2130
2120
  ' ': function _(event) {
2131
2121
  event.preventDefault();
2132
2122
  this.toggleMenu({
@@ -2134,7 +2124,7 @@
2134
2124
  });
2135
2125
  }
2136
2126
  });
2137
- _this.inputKeyDownHandlers = _extends(_extends({}, _this.keyDownHandlers), {}, {
2127
+ _this.inputKeyDownHandlers = _extends({}, _this.keyDownHandlers, {
2138
2128
  Home: function Home(event) {
2139
2129
  var _this4 = this;
2140
2130
 
@@ -2198,13 +2188,13 @@
2198
2188
  onBlur: callAllEventHandlers(onBlur, _this.buttonHandleBlur)
2199
2189
  };
2200
2190
  var eventHandlers = rest.disabled ? {} : enabledEventHandlers;
2201
- return _extends(_extends({
2191
+ return _extends({
2202
2192
  type: 'button',
2203
2193
  role: 'button',
2204
2194
  'aria-label': isOpen ? 'close menu' : 'open menu',
2205
2195
  'aria-haspopup': true,
2206
2196
  'data-toggle': true
2207
- }, eventHandlers), rest);
2197
+ }, eventHandlers, rest);
2208
2198
  };
2209
2199
 
2210
2200
  _this.buttonHandleKeyUp = function (event) {
@@ -2290,7 +2280,7 @@
2290
2280
  /* istanbul ignore if (react-native) */
2291
2281
 
2292
2282
 
2293
- return _extends(_extends({
2283
+ return _extends({
2294
2284
  'aria-autocomplete': 'list',
2295
2285
  'aria-activedescendant': isOpen && typeof highlightedIndex === 'number' && highlightedIndex >= 0 ? _this.getItemId(highlightedIndex) : null,
2296
2286
  'aria-controls': isOpen ? _this.menuId : null,
@@ -2300,7 +2290,7 @@
2300
2290
  autoComplete: 'off',
2301
2291
  value: inputValue,
2302
2292
  id: _this.inputId
2303
- }, eventHandlers), rest);
2293
+ }, eventHandlers, rest);
2304
2294
  };
2305
2295
 
2306
2296
  _this.inputHandleKeyDown = function (event) {
@@ -2418,11 +2408,11 @@
2418
2408
  var eventHandlers = rest.disabled ? {
2419
2409
  onMouseDown: enabledEventHandlers.onMouseDown
2420
2410
  } : enabledEventHandlers;
2421
- return _extends(_extends({
2411
+ return _extends({
2422
2412
  id: _this.getItemId(index),
2423
2413
  role: 'option',
2424
2414
  'aria-selected': _this.getState().highlightedIndex === index
2425
- }, eventHandlers), rest);
2415
+ }, eventHandlers, rest);
2426
2416
  };
2427
2417
 
2428
2418
  _this.clearItems = function () {
@@ -2455,11 +2445,11 @@
2455
2445
 
2456
2446
  _this.internalSetState(function (_ref9) {
2457
2447
  var isOpen = _ref9.isOpen;
2458
- return _extends(_extends({
2448
+ return _extends({
2459
2449
  isOpen: !isOpen
2460
2450
  }, isOpen && {
2461
2451
  highlightedIndex: _this.props.defaultHighlightedIndex
2462
- }), otherStateToSet);
2452
+ }, otherStateToSet);
2463
2453
  }, function () {
2464
2454
  var _this$getState7 = _this.getState(),
2465
2455
  isOpen = _this$getState7.isOpen,
@@ -2942,7 +2932,7 @@
2942
2932
  var refKeySpecified = refKey !== 'ref';
2943
2933
  var isComposite = !isDOMElement(element);
2944
2934
 
2945
- if (isComposite && !refKeySpecified && !reactIs_1(element)) {
2935
+ if (isComposite && !refKeySpecified && !reactIs.isForwardRef(element)) {
2946
2936
  // eslint-disable-next-line no-console
2947
2937
  console.error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps');
2948
2938
  } else if (!isComposite && refKeySpecified) {
@@ -2950,7 +2940,7 @@
2950
2940
  console.error("downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \"" + refKey + "\"");
2951
2941
  }
2952
2942
 
2953
- if (!reactIs_1(element) && !getElementProps(element)[refKey]) {
2943
+ if (!reactIs.isForwardRef(element) && !getElementProps(element)[refKey]) {
2954
2944
  // eslint-disable-next-line no-console
2955
2945
  console.error("downshift: You must apply the ref prop \"" + refKey + "\" from getRootProps onto your root element.");
2956
2946
  }
@@ -3100,7 +3090,7 @@
3100
3090
  actionRef.current = action;
3101
3091
  state = getState(state, action.props);
3102
3092
  var changes = reducer(state, action);
3103
- var newState = action.props.stateReducer(state, _extends(_extends({}, action), {}, {
3093
+ var newState = action.props.stateReducer(state, _extends({}, action, {
3104
3094
  changes: changes
3105
3095
  }));
3106
3096
  return newState;
@@ -3189,7 +3179,7 @@
3189
3179
  var highlightedIndex = getInitialValue(props, 'highlightedIndex');
3190
3180
  var inputValue = getInitialValue(props, 'inputValue');
3191
3181
  return {
3192
- highlightedIndex: highlightedIndex < 0 && selectedItem ? props.items.indexOf(selectedItem) : highlightedIndex,
3182
+ highlightedIndex: highlightedIndex < 0 && selectedItem && isOpen ? props.items.indexOf(selectedItem) : highlightedIndex,
3193
3183
  isOpen: isOpen,
3194
3184
  selectedItem: selectedItem,
3195
3185
  inputValue: inputValue
@@ -3300,6 +3290,8 @@
3300
3290
  */
3301
3291
 
3302
3292
  function useGetterPropsCalledChecker() {
3293
+ var isInitialMountRef = react.useRef(true);
3294
+
3303
3295
  for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {
3304
3296
  propKeys[_key] = arguments[_key];
3305
3297
  }
@@ -3308,27 +3300,28 @@
3308
3300
  acc[propKey] = {};
3309
3301
  return acc;
3310
3302
  }, {}));
3311
- Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {
3312
- getterPropsCalledRef.current[propKey] = null;
3313
- });
3314
3303
  react.useEffect(function () {
3315
3304
  Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {
3316
- if (!getterPropsCalledRef.current[propKey]) {
3317
- // eslint-disable-next-line no-console
3318
- console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
3319
- return;
3305
+ var propCallInfo = getterPropsCalledRef.current[propKey];
3306
+
3307
+ if (isInitialMountRef.current) {
3308
+ if (!Object.keys(propCallInfo).length) {
3309
+ // eslint-disable-next-line no-console
3310
+ console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
3311
+ return;
3312
+ }
3320
3313
  }
3321
3314
 
3322
- var _getterPropsCalledRef = getterPropsCalledRef.current[propKey],
3323
- suppressRefError = _getterPropsCalledRef.suppressRefError,
3324
- refKey = _getterPropsCalledRef.refKey,
3325
- elementRef = _getterPropsCalledRef.elementRef;
3315
+ var suppressRefError = propCallInfo.suppressRefError,
3316
+ refKey = propCallInfo.refKey,
3317
+ elementRef = propCallInfo.elementRef;
3326
3318
 
3327
3319
  if ((!elementRef || !elementRef.current) && !suppressRefError) {
3328
3320
  // eslint-disable-next-line no-console
3329
3321
  console.error("downshift: The ref prop \"" + refKey + "\" from " + propKey + " was not applied correctly on your element.");
3330
3322
  }
3331
3323
  });
3324
+ isInitialMountRef.current = false;
3332
3325
  });
3333
3326
  var setGetterPropCallInfo = react.useCallback(function (propKey, suppressRefError, refKey, elementRef) {
3334
3327
  getterPropsCalledRef.current[propKey] = {
@@ -3434,7 +3427,7 @@
3434
3427
  return '';
3435
3428
  }
3436
3429
 
3437
- var defaultProps$1 = _extends(_extends({}, defaultProps), {}, {
3430
+ var defaultProps$1 = _extends({}, defaultProps, {
3438
3431
  getA11yStatusMessage: getA11yStatusMessage$1
3439
3432
  });
3440
3433
 
@@ -3660,7 +3653,7 @@
3660
3653
  throw new Error('Reducer called without proper action type.');
3661
3654
  }
3662
3655
 
3663
- return _extends(_extends({}, state), changes);
3656
+ return _extends({}, state, changes);
3664
3657
  }
3665
3658
  /* eslint-enable complexity */
3666
3659
 
@@ -3675,7 +3668,7 @@
3675
3668
  /* istanbul ignore else */
3676
3669
  validatePropTypes(userProps); // Props defaults and destructuring.
3677
3670
 
3678
- var props = _extends(_extends({}, defaultProps$1), userProps);
3671
+ var props = _extends({}, defaultProps$1, userProps);
3679
3672
 
3680
3673
  var items = props.items,
3681
3674
  scrollIntoView = props.scrollIntoView,
@@ -3991,11 +3984,11 @@
3991
3984
 
3992
3985
  var latestState = latest.current.state;
3993
3986
  setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);
3994
- return _extends(_extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (menuNode) {
3987
+ return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (menuNode) {
3995
3988
  menuRef.current = menuNode;
3996
3989
  }), _extends2.id = elementIdsRef.current.menuId, _extends2.role = 'listbox', _extends2['aria-labelledby'] = elementIdsRef.current.labelId, _extends2.tabIndex = -1, _extends2), latestState.isOpen && latestState.highlightedIndex > -1 && {
3997
3990
  'aria-activedescendant': elementIdsRef.current.getItemId(latestState.highlightedIndex)
3998
- }), {}, {
3991
+ }, {
3999
3992
  onMouseLeave: callAllEventHandlers(onMouseLeave, function menuHandleMouseLeave() {
4000
3993
  dispatch({
4001
3994
  type: MenuMouseLeave
@@ -4226,7 +4219,7 @@
4226
4219
  inputValue = props.itemToString(selectedItem);
4227
4220
  }
4228
4221
 
4229
- return _extends(_extends({}, initialState), {}, {
4222
+ return _extends({}, initialState, {
4230
4223
  inputValue: inputValue
4231
4224
  });
4232
4225
  }
@@ -4291,20 +4284,21 @@
4291
4284
  dispatch = _useEnhancedReducer[1]; // ToDo: if needed, make same approach as selectedItemChanged from Downshift.
4292
4285
 
4293
4286
 
4294
- if (isControlledProp(props, 'selectedItem')) {
4295
- if (previousSelectedItemRef.current !== props.selectedItem) {
4296
- dispatch({
4297
- type: ControlledPropUpdatedSelectedItem,
4298
- inputValue: props.itemToString(props.selectedItem)
4299
- });
4300
- }
4301
-
4302
- previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
4303
- }
4287
+ react.useEffect(function () {
4288
+ if (isControlledProp(props, 'selectedItem')) {
4289
+ if (previousSelectedItemRef.current !== props.selectedItem) {
4290
+ dispatch({
4291
+ type: ControlledPropUpdatedSelectedItem,
4292
+ inputValue: props.itemToString(props.selectedItem)
4293
+ });
4294
+ }
4304
4295
 
4296
+ previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;
4297
+ }
4298
+ });
4305
4299
  return [getState(state, props), dispatch];
4306
4300
  }
4307
- var defaultProps$2 = _extends(_extends({}, defaultProps), {}, {
4301
+ var defaultProps$2 = _extends({}, defaultProps, {
4308
4302
  getA11yStatusMessage: getA11yStatusMessage,
4309
4303
  circularNavigation: true
4310
4304
  });
@@ -4469,7 +4463,7 @@
4469
4463
  throw new Error('Reducer called without proper action type.');
4470
4464
  }
4471
4465
 
4472
- return _extends(_extends({}, state), changes);
4466
+ return _extends({}, state, changes);
4473
4467
  }
4474
4468
  /* eslint-enable complexity */
4475
4469
 
@@ -4484,7 +4478,7 @@
4484
4478
  /* istanbul ignore else */
4485
4479
  validatePropTypes$1(userProps); // Props defaults and destructuring.
4486
4480
 
4487
- var props = _extends(_extends({}, defaultProps$2), userProps);
4481
+ var props = _extends({}, defaultProps$2, userProps);
4488
4482
 
4489
4483
  var initialIsOpen = props.initialIsOpen,
4490
4484
  defaultIsOpen = props.defaultIsOpen,
@@ -4520,8 +4514,7 @@
4520
4514
 
4521
4515
  var previousResultCountRef = react.useRef(); // used for checking when props are moving from controlled to uncontrolled.
4522
4516
 
4523
- var prevPropsRef = react.useRef(props); // used to store information about getter props being called on render.
4524
- // utility callback to get item element.
4517
+ var prevPropsRef = react.useRef(props); // utility callback to get item element.
4525
4518
 
4526
4519
  var latest = useLatestRef({
4527
4520
  state: state,
@@ -4737,7 +4730,7 @@
4737
4730
 
4738
4731
  var onSelectKey = 'onClick';
4739
4732
  var customClickHandler = onClick;
4740
- return _extends(_extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (itemNode) {
4733
+ return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (itemNode) {
4741
4734
  if (itemNode) {
4742
4735
  itemRefs.current[elementIdsRef.current.getItemId(itemIndex)] = itemNode;
4743
4736
  }
@@ -4758,7 +4751,11 @@
4758
4751
  type: ItemClick$1,
4759
4752
  index: index
4760
4753
  });
4761
- }), _ref4)), rest);
4754
+
4755
+ if (inputRef.current) {
4756
+ inputRef.current.focus();
4757
+ }
4758
+ }), _ref4), rest);
4762
4759
  }, [dispatch, latest]);
4763
4760
  var getToggleButtonProps = react.useCallback(function (_temp4) {
4764
4761
  var _extends4;
@@ -4781,11 +4778,11 @@
4781
4778
  }
4782
4779
  };
4783
4780
 
4784
- return _extends(_extends((_extends4 = {}, _extends4[refKey] = handleRefs(ref, function (toggleButtonNode) {
4781
+ return _extends((_extends4 = {}, _extends4[refKey] = handleRefs(ref, function (toggleButtonNode) {
4785
4782
  toggleButtonRef.current = toggleButtonNode;
4786
4783
  }), _extends4.id = elementIdsRef.current.toggleButtonId, _extends4.tabIndex = -1, _extends4), !rest.disabled && _extends({}, {
4787
4784
  onClick: callAllEventHandlers(onClick, toggleButtonHandleClick)
4788
- })), rest);
4785
+ }), rest);
4789
4786
  }, [dispatch, latest]);
4790
4787
  var getInputProps = react.useCallback(function (_temp5, _temp6) {
4791
4788
  var _extends5;
@@ -4845,17 +4842,17 @@
4845
4842
  /* istanbul ignore if (react-native) */
4846
4843
 
4847
4844
 
4848
- return _extends(_extends(_extends((_extends5 = {}, _extends5[refKey] = handleRefs(ref, function (inputNode) {
4845
+ return _extends((_extends5 = {}, _extends5[refKey] = handleRefs(ref, function (inputNode) {
4849
4846
  inputRef.current = inputNode;
4850
4847
  }), _extends5.id = elementIdsRef.current.inputId, _extends5['aria-autocomplete'] = 'list', _extends5['aria-controls'] = elementIdsRef.current.menuId, _extends5), latestState.isOpen && latestState.highlightedIndex > -1 && {
4851
4848
  'aria-activedescendant': elementIdsRef.current.getItemId(latestState.highlightedIndex)
4852
- }), {}, {
4849
+ }, {
4853
4850
  'aria-labelledby': elementIdsRef.current.labelId,
4854
4851
  // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
4855
4852
  // revert back since autocomplete="nope" is ignored on latest Chrome and Opera
4856
4853
  autoComplete: 'off',
4857
4854
  value: latestState.inputValue
4858
- }, eventHandlers), rest);
4855
+ }, eventHandlers, rest);
4859
4856
  }, [dispatch, inputKeyDownHandlers, latest, mouseAndTouchTrackersRef, setGetterPropCallInfo]);
4860
4857
  var getComboboxProps = react.useCallback(function (_temp7, _temp8) {
4861
4858
  var _extends6;
@@ -5208,7 +5205,7 @@
5208
5205
  throw new Error('Reducer called without proper action type.');
5209
5206
  }
5210
5207
 
5211
- return _extends(_extends({}, state), changes);
5208
+ return _extends({}, state, changes);
5212
5209
  }
5213
5210
 
5214
5211
  useMultipleSelection.stateChangeTypes = stateChangeTypes$3;
@@ -5219,7 +5216,7 @@
5219
5216
  }
5220
5217
 
5221
5218
  // Props defaults and destructuring.
5222
- var props = _extends(_extends({}, defaultProps$3), userProps);
5219
+ var props = _extends({}, defaultProps$3, userProps);
5223
5220
 
5224
5221
  var getA11yRemovalMessage = props.getA11yRemovalMessage,
5225
5222
  itemToString = props.itemToString,
@@ -5388,7 +5385,7 @@
5388
5385
  suppressRefError = _ref5$suppressRefErro === void 0 ? false : _ref5$suppressRefErro;
5389
5386
 
5390
5387
  setGetterPropCallInfo('getDropdownProps', suppressRefError, refKey, dropdownRef);
5391
- return _extends(_extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (dropdownNode) {
5388
+ return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (dropdownNode) {
5392
5389
  if (dropdownNode) {
5393
5390
  dropdownRef.current = dropdownNode;
5394
5391
  }
@@ -5405,7 +5402,7 @@
5405
5402
  type: DropdownClick
5406
5403
  });
5407
5404
  })
5408
- }), rest);
5405
+ }, rest);
5409
5406
  }, [dispatch, dropdownKeyDownHandlers, setGetterPropCallInfo]); // returns
5410
5407
 
5411
5408
  var addSelectedItem = react.useCallback(function (selectedItem) {