fixed template handling in new useredit view

This commit is contained in:
2025-09-09 14:32:25 +02:00
parent 5d6285c116
commit 2aa26568f1
2 changed files with 17 additions and 5 deletions
@@ -58,9 +58,16 @@ Vue.component('tt-select', {
},
filteredOptions() {
if (!this.searchable || !this.searchQuery) return this.normalizedOptions;
const displayLimit = 100;
if (!this.searchable || !this.searchQuery) {
return this.normalizedOptions.slice(0, displayLimit);
}
const q = this.searchQuery.toLowerCase();
return this.normalizedOptions.filter(o => o.text.toLowerCase().includes(q));
return this.normalizedOptions
.filter(option => option.text.toLowerCase().includes(q))
.slice(0, displayLimit);
},
displayText() {