@ship-ui/core 0.13.25 → 0.13.27
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/fesm2022/ship-ui-core.mjs +13 -15
- package/fesm2022/ship-ui-core.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3135,17 +3135,15 @@ class ShipSelectComponent {
|
|
|
3135
3135
|
return;
|
|
3136
3136
|
this.open();
|
|
3137
3137
|
});
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
});
|
|
3148
|
-
}
|
|
3138
|
+
input.addEventListener('input', (e) => {
|
|
3139
|
+
const newInputValue = e.target.value;
|
|
3140
|
+
const inputValue = this.inputValue();
|
|
3141
|
+
if (newInputValue === inputValue)
|
|
3142
|
+
return;
|
|
3143
|
+
this.focusedOptionIndex.set(this.asFreeText() ? -1 : 0);
|
|
3144
|
+
this.inputValue.set(newInputValue);
|
|
3145
|
+
this.updateInputElValue();
|
|
3146
|
+
});
|
|
3149
3147
|
input.addEventListener('inputValueChanged', (event) => {
|
|
3150
3148
|
const newInputValue = event.detail.value;
|
|
3151
3149
|
const inputValue = this.inputValue();
|
|
@@ -3193,7 +3191,7 @@ class ShipSelectComponent {
|
|
|
3193
3191
|
}
|
|
3194
3192
|
if (e.key === 'Enter') {
|
|
3195
3193
|
e.preventDefault();
|
|
3196
|
-
this.toggleOptionByIndex(this.focusedOptionIndex());
|
|
3194
|
+
this.toggleOptionByIndex(this.focusedOptionIndex(), undefined, true);
|
|
3197
3195
|
}
|
|
3198
3196
|
if (e.key === 'ArrowDown') {
|
|
3199
3197
|
e.preventDefault();
|
|
@@ -3390,7 +3388,7 @@ class ShipSelectComponent {
|
|
|
3390
3388
|
return '';
|
|
3391
3389
|
return label.replaceAll(' ', '-');
|
|
3392
3390
|
}
|
|
3393
|
-
toggleOptionByIndex(optionIndex, event) {
|
|
3391
|
+
toggleOptionByIndex(optionIndex, event, enterKey = false) {
|
|
3394
3392
|
let option = this.filteredOptions()[optionIndex];
|
|
3395
3393
|
if (this.asFreeText() && optionIndex === -1) {
|
|
3396
3394
|
const newOption = this.computedFreeTextOption();
|
|
@@ -3587,7 +3585,7 @@ class ShipSelectComponent {
|
|
|
3587
3585
|
@let _selOptionTemplate = _selectedOptionTemplate || _optionTemplate || _inlineTemplate;
|
|
3588
3586
|
@let _listOptionTemplate = _optionTemplate || _inlineTemplate;
|
|
3589
3587
|
@let _asChips = !asText() && selectMultiple();
|
|
3590
|
-
@let _showSearchText = isOpen() && hasSearch() && (_asChips || inputValue().length >
|
|
3588
|
+
@let _showSearchText = isOpen() && hasSearch() && (_asChips || inputValue().length > -1);
|
|
3591
3589
|
|
|
3592
3590
|
<sh-popover
|
|
3593
3591
|
#formFieldWrapper
|
|
@@ -3756,7 +3754,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
3756
3754
|
@let _selOptionTemplate = _selectedOptionTemplate || _optionTemplate || _inlineTemplate;
|
|
3757
3755
|
@let _listOptionTemplate = _optionTemplate || _inlineTemplate;
|
|
3758
3756
|
@let _asChips = !asText() && selectMultiple();
|
|
3759
|
-
@let _showSearchText = isOpen() && hasSearch() && (_asChips || inputValue().length >
|
|
3757
|
+
@let _showSearchText = isOpen() && hasSearch() && (_asChips || inputValue().length > -1);
|
|
3760
3758
|
|
|
3761
3759
|
<sh-popover
|
|
3762
3760
|
#formFieldWrapper
|