mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-25 19:17:39 +03:00
fix(core): push all freeInputPattern into filteredOptions selectorModal
This commit is contained in:
parent
555c7f7b20
commit
9ac5286017
@ -76,10 +76,11 @@ export class SelectorModalComponent<T> {
|
||||
{ sort: true },
|
||||
).search(f)
|
||||
|
||||
const freeOption = this.options.find(x => x.freeInputPattern)
|
||||
if (freeOption && !this.filteredOptions.includes(freeOption)) {
|
||||
this.filteredOptions.push(freeOption)
|
||||
}
|
||||
this.options.filter(x => x.freeInputPattern).forEach(freeOption => {
|
||||
if (freeOption && !this.filteredOptions.includes(freeOption)) {
|
||||
this.filteredOptions.push(freeOption)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.selectedIndex = Math.max(0, this.selectedIndex)
|
||||
this.selectedIndex = Math.min(this.filteredOptions.length - 1, this.selectedIndex)
|
||||
|
Loading…
Reference in New Issue
Block a user