@finema/core 2.27.0 → 2.29.0
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -177,10 +177,12 @@ const onKeydown = (event) => {
|
|
|
177
177
|
scrollToSelectedSuggestion();
|
|
178
178
|
break;
|
|
179
179
|
case "Enter":
|
|
180
|
+
if (selectedSuggestionIndex.value === -1) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
180
183
|
event.preventDefault();
|
|
181
184
|
if (selectedSuggestionIndex.value >= 0) {
|
|
182
185
|
selectSuggestion(filteredSuggestions.value[selectedSuggestionIndex.value], selectedSuggestionIndex.value);
|
|
183
|
-
emits("selected", filteredSuggestions.value[selectedSuggestionIndex.value]);
|
|
184
186
|
}
|
|
185
187
|
break;
|
|
186
188
|
case "Escape":
|
|
@@ -194,6 +196,7 @@ const selectSuggestion = (suggestion, index) => {
|
|
|
194
196
|
scrollToSuggestionByIndex(index);
|
|
195
197
|
}
|
|
196
198
|
handleChange(suggestion);
|
|
199
|
+
emits("selected", suggestion);
|
|
197
200
|
emits("change", suggestion);
|
|
198
201
|
showSuggestions.value = false;
|
|
199
202
|
selectedSuggestionIndex.value = -1;
|