Skip to content

Commit

Permalink
fix(core): Eugeny#8709 sort freeInputPattern by weight
Browse files Browse the repository at this point in the history
  • Loading branch information
Clem-Fern committed Jul 20, 2023
1 parent 4dedbbc commit d57757c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tabby-core/src/components/selectorModal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class SelectorModalComponent<T> {
{ sort: true },
).search(f)

this.options.filter(x => x.freeInputPattern).forEach(freeOption => {
this.options.filter(x => x.freeInputPattern).sort(firstBy<SelectorOption<T>, number>(x => x.weight ?? 0)).forEach(freeOption => {
if (!this.filteredOptions.includes(freeOption)) {
this.filteredOptions.push(freeOption)
}
Expand Down

0 comments on commit d57757c

Please sign in to comment.