mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-14 00:20:13 +00:00
allow searching for hotkey values - #1509
This commit is contained in:
parent
6d0b2608a2
commit
efe390f68d
@ -288,7 +288,7 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
||||
th ID
|
||||
th Hotkey
|
||||
ng-container(*ngFor='let hotkey of hotkeyDescriptions')
|
||||
tr(*ngIf='!hotkeyFilter || hotkey.name.toLowerCase().includes(hotkeyFilter.toLowerCase())')
|
||||
tr(*ngIf='!hotkeyFilter || hotkeyFilterFn(hotkey, hotkeyFilter)')
|
||||
td {{hotkey.name}}
|
||||
td {{hotkey.id}}
|
||||
td.pr-5
|
||||
|
@ -144,4 +144,10 @@ export class SettingsTabComponent extends BaseTabComponent {
|
||||
}
|
||||
ptr[prop] = value
|
||||
}
|
||||
|
||||
hotkeyFilterFn (hotkey: HotkeyDescription, query: string): boolean {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||
const s = hotkey.name + (this.getHotkey(hotkey.id) || []).toString() as string
|
||||
return s.toLowerCase().includes(query.toLowerCase())
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user