@entur/dropdown 2.2.4 → 2.3.0

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.
@@ -311,7 +311,7 @@ var Appendix$1 = function Appendix(_ref3) {
311
311
  };
312
312
 
313
313
  var _excluded$4 = ["disabled", "placeholder", "selectOnTab", "openOnFocus", "listStyle", "items", "label", "disableLabelAnimation", "loading", "loadingText", "className", "clearable"];
314
- var RegularDropdown = function RegularDropdown(_ref) {
314
+ var RegularDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
315
315
  var disabled = _ref.disabled,
316
316
  _ref$placeholder = _ref.placeholder,
317
317
  placeholder = _ref$placeholder === void 0 ? 'Vennligst velg' : _ref$placeholder,
@@ -387,8 +387,10 @@ var RegularDropdown = function RegularDropdown(_ref) {
387
387
  !isOpen && openMenu();
388
388
  }
389
389
  }
390
- }, rest))), selectedItem ? selectedItem.label : placeholder));
391
- };
390
+ }, rest)), {
391
+ ref: ref
392
+ }), selectedItem ? selectedItem.label : placeholder));
393
+ });
392
394
 
393
395
  var _excluded$3 = ["disabled", "className", "items", "loading", "loadingText", "readOnly", "prepend", "selectOnTab", "openOnFocus", "listStyle", "clearable", "itemFilter", "label", "disableLabelAnimation", "placeholder"];
394
396
 
@@ -402,7 +404,7 @@ function LowerCaseFilterTest(item, input) {
402
404
  return inputRegex.test(item.label);
403
405
  }
404
406
 
405
- var SearchableDropdown = function SearchableDropdown(_ref) {
407
+ var SearchableDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
406
408
  var _ref$disabled = _ref.disabled,
407
409
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
408
410
  className = _ref.className,
@@ -470,8 +472,10 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
470
472
  }
471
473
  },
472
474
  placeholder: selectedItem ? undefined : placeholder
473
- }, rest)))));
474
- };
475
+ }, rest)), {
476
+ ref: ref
477
+ })));
478
+ });
475
479
 
476
480
  var DropdownInputGroup = function DropdownInputGroup(_ref) {
477
481
  var children = _ref.children,
@@ -1356,7 +1360,7 @@ debounceTimeout) {
1356
1360
  };
1357
1361
 
1358
1362
  var _excluded$2 = ["highlightFirstItemOnOpen", "debounceTimeout", "disabled", "feedback", "items", "label", "loadingText", "onChange", "placeholder", "prepend", "readOnly", "searchable", "selectOnTab", "openOnFocus", "variant", "value", "clearable", "className", "style", "listStyle", "itemFilter", "disableLabelAnimation"];
1359
- var Dropdown = function Dropdown(_ref) {
1363
+ var Dropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1360
1364
  var highlightFirstItemOnOpen = _ref.highlightFirstItemOnOpen,
1361
1365
  debounceTimeout = _ref.debounceTimeout,
1362
1366
  disabled = _ref.disabled,
@@ -1427,9 +1431,10 @@ var Dropdown = function Dropdown(_ref) {
1427
1431
  openOnFocus: openOnFocus,
1428
1432
  listStyle: listStyle,
1429
1433
  clearable: clearable,
1430
- disableLabelAnimation: disableLabelAnimation
1434
+ disableLabelAnimation: disableLabelAnimation,
1435
+ ref: ref
1431
1436
  }, searchAbleProps))));
1432
- };
1437
+ });
1433
1438
 
1434
1439
  var _excluded$1 = ["className", "disabled", "readOnly", "items", "loadingText", "prepend", "style", "label", "variant", "feedback", "disableLabelAnimation"];
1435
1440
  var NativeDropdown = function NativeDropdown(_ref) {