@entur/dropdown 6.0.13-beta.0 → 6.0.14
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/dist/dropdown.cjs.development.js +5 -1
- package/dist/dropdown.cjs.development.js.map +1 -1
- package/dist/dropdown.cjs.production.min.js +1 -1
- package/dist/dropdown.cjs.production.min.js.map +1 -1
- package/dist/dropdown.esm.js +5 -1
- package/dist/dropdown.esm.js.map +1 -1
- package/dist/styles.css +0 -3
- package/package.json +11 -11
|
@@ -468,6 +468,7 @@ var DropdownList = function DropdownList(_ref) {
|
|
|
468
468
|
className: "eds-dropdown__list",
|
|
469
469
|
style: _extends({}, rest.style)
|
|
470
470
|
}), !loading && listItems.length > 0 && listItems.map(function (item, index) {
|
|
471
|
+
var _item$icons$map, _item$icons;
|
|
471
472
|
var itemIsSelectAll = item.value === (selectAllItem == null ? void 0 : selectAllItem.value);
|
|
472
473
|
if (itemIsSelectAll && listItems.length <= 2) return null;
|
|
473
474
|
return React.createElement("li", _extends({
|
|
@@ -476,7 +477,10 @@ var DropdownList = function DropdownList(_ref) {
|
|
|
476
477
|
'eds-dropdown__list__item--highlighted': highlightedIndex === index,
|
|
477
478
|
'eds-dropdown__list__item--selected': !isMultiselect && isItemSelected(item)
|
|
478
479
|
}),
|
|
479
|
-
key: (item == null ? void 0 : item.label) + (item == null ? void 0 : item.value)
|
|
480
|
+
key: (item == null ? void 0 : item.label) + (item == null ? void 0 : item.value) + ((_item$icons$map = item == null || (_item$icons = item.icons) == null ? void 0 : _item$icons.map(function (icon) {
|
|
481
|
+
var _icon$displayName;
|
|
482
|
+
return (_icon$displayName = icon.displayName) != null ? _icon$displayName : icon.name;
|
|
483
|
+
})) != null ? _item$icons$map : '').toString()
|
|
480
484
|
}, getItemProps({
|
|
481
485
|
// @ts-expect-error Since getItemProps expects the same item type
|
|
482
486
|
// here as items, it throws error when selectAllItem is a string.
|