@entur/dropdown 7.3.0 → 7.3.1
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 +8 -5
- 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 +8 -5
- package/dist/dropdown.esm.js.map +1 -1
- package/dist/styles.css +77 -77
- package/package.json +2 -2
|
@@ -884,7 +884,7 @@ function getA11yStatusMessage(options) {
|
|
|
884
884
|
|
|
885
885
|
var _excluded$3 = ["ariaLabelChosenSingular", "ariaLabelCloseList", "ariaLabelOpenList", "ariaLabelSelectedItem", "className", "clearable", "debounceTimeout", "disabled", "disableLabelAnimation", "feedback", "items", "itemFilter", "label", "labelClearSelectedItem", "labelTooltip", "listStyle", "loading", "loadingText", "noMatchesText", "onChange", "placeholder", "prepend", "readOnly", "selectedItem", "selectOnBlur", "selectOnTab", "style", "variant"];
|
|
886
886
|
var SearchableDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
887
|
-
var _document,
|
|
887
|
+
var _document, _selectedItem$label;
|
|
888
888
|
var ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
|
|
889
889
|
_ref$ariaLabelCloseLi = _ref.ariaLabelCloseList,
|
|
890
890
|
ariaLabelCloseList = _ref$ariaLabelCloseLi === void 0 ? 'Lukk liste med valg' : _ref$ariaLabelCloseLi,
|
|
@@ -1117,9 +1117,6 @@ var SearchableDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1117
1117
|
labelId: getLabelProps().id,
|
|
1118
1118
|
labelProps: getLabelProps(),
|
|
1119
1119
|
labelTooltip: labelTooltip,
|
|
1120
|
-
onBlur: function onBlur() {
|
|
1121
|
-
return setInputValue('');
|
|
1122
|
-
},
|
|
1123
1120
|
onClick: function onClick(e) {
|
|
1124
1121
|
if (e.target === e.currentTarget) {
|
|
1125
1122
|
var _getInputProps;
|
|
@@ -1156,7 +1153,13 @@ var SearchableDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1156
1153
|
className: classNames('eds-dropdown--searchable__selected-item', {
|
|
1157
1154
|
'eds-dropdown--searchable__selected-item--hidden': !showSelectedItem
|
|
1158
1155
|
}),
|
|
1159
|
-
onClick:
|
|
1156
|
+
onClick: function onClick(event) {
|
|
1157
|
+
if (!disabled && !readOnly) {
|
|
1158
|
+
var _inputRef$current2, _getInputProps2;
|
|
1159
|
+
(_inputRef$current2 = inputRef.current) == null || _inputRef$current2.focus();
|
|
1160
|
+
(_getInputProps2 = getInputProps()) == null || _getInputProps2.onClick == null || _getInputProps2.onClick(event);
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1160
1163
|
tabIndex: readOnly ? 0 : -1
|
|
1161
1164
|
}, showSelectedItem ? selectedItem == null ? void 0 : selectedItem.label : ''), React.createElement("input", _extends({
|
|
1162
1165
|
className: classNames('eds-dropdown__input eds-form-control', {
|