fix: show shared env scopes dropdown even when no variables exist (#7342)

This commit is contained in:
Andras Bacsai 2025-11-26 09:47:40 +01:00 committed by GitHub
commit 5f33ad74b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,22 +20,12 @@
availableVars: @js($availableVars),
scopeUrls: @js($scopeUrls),
isAutocompleteDisabled() {
const hasAnyVars = Object.values(this.availableVars).some(vars => vars.length > 0);
return !hasAnyVars;
},
handleInput() {
const input = this.$refs.input;
if (!input) return;
const value = input.value || '';
if (this.isAutocompleteDisabled()) {
this.showDropdown = false;
return;
}
this.cursorPosition = input.selectionStart || 0;
const textBeforeCursor = value.substring(0, this.cursorPosition);