@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.
- package/dist/dropdown.cjs.development.js +5 -4
- 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 -4
- package/dist/dropdown.esm.js.map +1 -1
- package/dist/styles.css +117 -117
- package/package.json +8 -8
package/dist/dropdown.esm.js
CHANGED
|
@@ -1313,8 +1313,9 @@ var DropdownList = function DropdownList(_ref) {
|
|
|
1313
1313
|
}), React.createElement("span", {
|
|
1314
1314
|
className: "eds-dropdown__list__item__text"
|
|
1315
1315
|
}, item.label, React.createElement(VisuallyHidden, null, isItemSelected(item) ? ariaLabelSelectedItem : '')), item.icons && React.createElement("span", null, item.icons.map(function (Icon) {
|
|
1316
|
+
var _Icon$displayName;
|
|
1316
1317
|
return React.createElement(Icon, {
|
|
1317
|
-
key: (item == null ? void 0 : item.label) + (item == null ? void 0 : item.value) + (Icon == null ? void 0 : Icon.displayName),
|
|
1318
|
+
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),
|
|
1318
1319
|
inline: true,
|
|
1319
1320
|
className: "eds-dropdown__list__item__icon"
|
|
1320
1321
|
});
|
|
@@ -1867,7 +1868,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1867
1868
|
setShowSelectedItem(false);
|
|
1868
1869
|
},
|
|
1869
1870
|
onKeyDown: function onKeyDown(e) {
|
|
1870
|
-
if (selectOnTab && e.key === 'Tab') {
|
|
1871
|
+
if (selectOnTab && isOpen && e.key === 'Tab') {
|
|
1871
1872
|
var highlitedItem = listItems[highlightedIndex];
|
|
1872
1873
|
if (highlitedItem) {
|
|
1873
1874
|
// we don't want to clear selection with tab
|
|
@@ -2234,7 +2235,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2234
2235
|
disabled: readOnly || disabled
|
|
2235
2236
|
}, getInputProps(_extends({
|
|
2236
2237
|
onKeyDown: function onKeyDown(e) {
|
|
2237
|
-
if (selectOnTab && e.key === 'Tab') {
|
|
2238
|
+
if (selectOnTab && isOpen && e.key === 'Tab') {
|
|
2238
2239
|
var highlitedItem = listItems[highlightedIndex];
|
|
2239
2240
|
// we don't want to clear selection with tab
|
|
2240
2241
|
if (highlitedItem) {
|
|
@@ -2375,7 +2376,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2375
2376
|
}, getToggleButtonProps({
|
|
2376
2377
|
id: undefined,
|
|
2377
2378
|
onKeyDown: function onKeyDown(e) {
|
|
2378
|
-
if (selectOnTab && e.key === 'Tab') {
|
|
2379
|
+
if (selectOnTab && isOpen && e.key === 'Tab') {
|
|
2379
2380
|
// we don't want to clear selection with tab
|
|
2380
2381
|
var highlitedItem = normalizedItems[highlightedIndex];
|
|
2381
2382
|
if (highlitedItem) {
|