@entur/dropdown 5.0.1 → 5.0.3

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.
@@ -903,7 +903,7 @@ debounceTimeout) {
903
903
  if (isItemsFunction) {
904
904
  fetchItems('');
905
905
  }
906
- }, [isItemsFunction]); // eslint-disable-line react-hooks/exhaustive-deps
906
+ }, [isItemsFunction, fetchItems]);
907
907
  return {
908
908
  items: normalizedItems,
909
909
  loading: isItemsFunction ? loading : false,
@@ -1321,9 +1321,9 @@ var DropdownList = function DropdownList(_ref) {
1321
1321
  tabIndex: -1
1322
1322
  }), React__default["default"].createElement("span", {
1323
1323
  className: "eds-dropdown__list__item__text"
1324
- }, item.label, React__default["default"].createElement(a11y.VisuallyHidden, null, isItemSelected(item) ? ariaLabelSelectedItem : '')), item.icons && React__default["default"].createElement("span", null, item.icons.map(function (Icon, index) {
1324
+ }, item.label, React__default["default"].createElement(a11y.VisuallyHidden, null, isItemSelected(item) ? ariaLabelSelectedItem : '')), item.icons && React__default["default"].createElement("span", null, item.icons.map(function (Icon) {
1325
1325
  return React__default["default"].createElement(Icon, {
1326
- key: index,
1326
+ key: Icon.displayName,
1327
1327
  inline: true,
1328
1328
  className: "eds-dropdown__list__item__icon"
1329
1329
  });
@@ -1340,14 +1340,14 @@ var DropdownList = function DropdownList(_ref) {
1340
1340
  var itemIsSelectAll = item.value === (selectAllItem == null ? void 0 : selectAllItem.value);
1341
1341
  if (itemIsSelectAll && listItems.length <= 2) return null;
1342
1342
  return React__default["default"].createElement("li", _extends({
1343
- key: item.label,
1343
+ key: item.label + item.value,
1344
1344
  className: classNames__default["default"]('eds-dropdown__list__item', {
1345
1345
  'eds-dropdown__list__item--select-all': itemIsSelectAll,
1346
1346
  'eds-dropdown__list__item--highlighted': highlightedIndex === index,
1347
1347
  'eds-dropdown__list__item--selected': !isMultiselect && isItemSelected(item)
1348
1348
  })
1349
1349
  }, getItemProps({
1350
- key: item.label,
1350
+ key: item.label + item.value,
1351
1351
  item: item,
1352
1352
  index: index
1353
1353
  })), itemIsSelectAll ? selectAllListItemContent() : listItemContent(item));