@alauda/ui 6.4.1-beta.6 → 6.4.1-beta.7
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/fesm2020/alauda-ui.mjs
CHANGED
|
@@ -1901,13 +1901,14 @@ class AutoCompleteDirective extends BaseTooltip {
|
|
|
1901
1901
|
this.disposeTooltip();
|
|
1902
1902
|
}
|
|
1903
1903
|
createTooltip() {
|
|
1904
|
-
if (this.isCreated) {
|
|
1905
|
-
return;
|
|
1906
|
-
}
|
|
1907
1904
|
super.createTooltip();
|
|
1908
1905
|
this.autoFocusFirstSuggestion();
|
|
1909
1906
|
}
|
|
1910
1907
|
autoFocusFirstSuggestion() {
|
|
1908
|
+
const focusedSuggestion = this.autocomplete.suggestions.find(suggestion => suggestion.focused);
|
|
1909
|
+
if (focusedSuggestion) {
|
|
1910
|
+
return;
|
|
1911
|
+
}
|
|
1911
1912
|
const selectedSuggestion = this.autocomplete.suggestions.find(suggestion => suggestion.selected);
|
|
1912
1913
|
if (selectedSuggestion) {
|
|
1913
1914
|
this.resetFocusedSuggestion(selectedSuggestion);
|