@entur/dropdown 5.0.20 → 5.0.22

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.
@@ -1317,8 +1317,9 @@ var DropdownList = function DropdownList(_ref) {
1317
1317
  }), React.createElement("span", {
1318
1318
  className: "eds-dropdown__list__item__text"
1319
1319
  }, item.label, React.createElement(a11y.VisuallyHidden, null, isItemSelected(item) ? ariaLabelSelectedItem : '')), item.icons && React.createElement("span", null, item.icons.map(function (Icon) {
1320
+ var _Icon$displayName;
1320
1321
  return React.createElement(Icon, {
1321
- key: (item == null ? void 0 : item.label) + (item == null ? void 0 : item.value) + (Icon == null ? void 0 : Icon.displayName),
1322
+ key: (item == null ? void 0 : item.label) + (item == null ? void 0 : item.value) + ((_Icon$displayName = Icon == null ? void 0 : Icon.displayName) != null ? _Icon$displayName : Icon == null ? void 0 : Icon.name),
1322
1323
  inline: true,
1323
1324
  className: "eds-dropdown__list__item__icon"
1324
1325
  });
@@ -1871,7 +1872,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
1871
1872
  setShowSelectedItem(false);
1872
1873
  },
1873
1874
  onKeyDown: function onKeyDown(e) {
1874
- if (selectOnTab && e.key === 'Tab') {
1875
+ if (selectOnTab && isOpen && e.key === 'Tab') {
1875
1876
  var highlitedItem = listItems[highlightedIndex];
1876
1877
  if (highlitedItem) {
1877
1878
  // we don't want to clear selection with tab
@@ -2238,7 +2239,7 @@ var MultiSelect = function MultiSelect(_ref) {
2238
2239
  disabled: readOnly || disabled
2239
2240
  }, getInputProps(_extends({
2240
2241
  onKeyDown: function onKeyDown(e) {
2241
- if (selectOnTab && e.key === 'Tab') {
2242
+ if (selectOnTab && isOpen && e.key === 'Tab') {
2242
2243
  var highlitedItem = listItems[highlightedIndex];
2243
2244
  // we don't want to clear selection with tab
2244
2245
  if (highlitedItem) {
@@ -2379,7 +2380,7 @@ var Dropdown = function Dropdown(_ref) {
2379
2380
  }, getToggleButtonProps({
2380
2381
  id: undefined,
2381
2382
  onKeyDown: function onKeyDown(e) {
2382
- if (selectOnTab && e.key === 'Tab') {
2383
+ if (selectOnTab && isOpen && e.key === 'Tab') {
2383
2384
  // we don't want to clear selection with tab
2384
2385
  var highlitedItem = normalizedItems[highlightedIndex];
2385
2386
  if (highlitedItem) {