@mmb-digital/ds-lilly 0.3.7 → 0.3.8
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/ds-lilly.js +3 -3
- package/package.json +1 -1
package/dist/ds-lilly.js
CHANGED
|
@@ -98331,7 +98331,7 @@ var Autocomplete2 = function (_a) {
|
|
|
98331
98331
|
.map(function (item, index) { return (!item.isDisabled ? { category: -1, item: index } : undefined); })
|
|
98332
98332
|
.filter(Boolean);
|
|
98333
98333
|
}
|
|
98334
|
-
if (emptyValueLabel && (fulltextValue === (buttonValue === null || buttonValue === void 0 ? void 0 : buttonValue.label) || !value)) {
|
|
98334
|
+
if (emptyValueLabel && map.length > 0 && (fulltextValue === (buttonValue === null || buttonValue === void 0 ? void 0 : buttonValue.label) || !value)) {
|
|
98335
98335
|
return Autocomplete2_spreadArray([{ item: -1, category: -1 }], map);
|
|
98336
98336
|
}
|
|
98337
98337
|
return map;
|
|
@@ -98695,7 +98695,7 @@ var Autocomplete2 = function (_a) {
|
|
|
98695
98695
|
if (key === KEYS.Enter) {
|
|
98696
98696
|
event.preventDefault();
|
|
98697
98697
|
if (isDropdownVisible) {
|
|
98698
|
-
var minItemsToAutoselect = emptyValueLabel ? 2 : 1;
|
|
98698
|
+
var minItemsToAutoselect = emptyValueLabel && !value ? 2 : 1;
|
|
98699
98699
|
if (showCreatable && itemsIndex.length === 0) {
|
|
98700
98700
|
handleCreateNewOption();
|
|
98701
98701
|
}
|
|
@@ -98845,7 +98845,7 @@ var Autocomplete2 = function (_a) {
|
|
|
98845
98845
|
};
|
|
98846
98846
|
var focusedItem = itemsIndex[currentItemPosition];
|
|
98847
98847
|
var select2context = {
|
|
98848
|
-
emptyValueLabel: fulltextValue === (buttonValue === null || buttonValue === void 0 ? void 0 : buttonValue.label) || !value ? emptyValueLabel : undefined,
|
|
98848
|
+
emptyValueLabel: itemsIndex.length > 0 && (fulltextValue === (buttonValue === null || buttonValue === void 0 ? void 0 : buttonValue.label) || !value) ? emptyValueLabel : undefined,
|
|
98849
98849
|
focusedCategoryIndex: focusedItem ? focusedItem.category : -1,
|
|
98850
98850
|
focusedItemIndex: focusedItem ? focusedItem.item : -1,
|
|
98851
98851
|
items: items,
|