mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 14:00:03 +00: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 },
|
{ sort: true },
|
||||||
).search(f)
|
).search(f)
|
||||||
|
|
||||||
const freeOption = this.options.find(x => x.freeInputPattern)
|
this.options.filter(x => x.freeInputPattern).forEach(freeOption => {
|
||||||
if (freeOption && !this.filteredOptions.includes(freeOption)) {
|
if (freeOption && !this.filteredOptions.includes(freeOption)) {
|
||||||
this.filteredOptions.push(freeOption)
|
this.filteredOptions.push(freeOption)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.selectedIndex = Math.max(0, this.selectedIndex)
|
this.selectedIndex = Math.max(0, this.selectedIndex)
|
||||||
this.selectedIndex = Math.min(this.filteredOptions.length - 1, this.selectedIndex)
|
this.selectedIndex = Math.min(this.filteredOptions.length - 1, this.selectedIndex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user