fix: show shared env scopes dropdown even when no variables exist (#7342)
This commit is contained in:
commit
5f33ad74b5
1 changed files with 0 additions and 10 deletions
|
|
@ -20,22 +20,12 @@
|
||||||
availableVars: @js($availableVars),
|
availableVars: @js($availableVars),
|
||||||
scopeUrls: @js($scopeUrls),
|
scopeUrls: @js($scopeUrls),
|
||||||
|
|
||||||
isAutocompleteDisabled() {
|
|
||||||
const hasAnyVars = Object.values(this.availableVars).some(vars => vars.length > 0);
|
|
||||||
return !hasAnyVars;
|
|
||||||
},
|
|
||||||
|
|
||||||
handleInput() {
|
handleInput() {
|
||||||
const input = this.$refs.input;
|
const input = this.$refs.input;
|
||||||
if (!input) return;
|
if (!input) return;
|
||||||
|
|
||||||
const value = input.value || '';
|
const value = input.value || '';
|
||||||
|
|
||||||
if (this.isAutocompleteDisabled()) {
|
|
||||||
this.showDropdown = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.cursorPosition = input.selectionStart || 0;
|
this.cursorPosition = input.selectionStart || 0;
|
||||||
const textBeforeCursor = value.substring(0, this.cursorPosition);
|
const textBeforeCursor = value.substring(0, this.cursorPosition);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue