forked from mystiq/hydrogen-web
clear filter on esc
This commit is contained in:
parent
ddbe3305c8
commit
0d6fe32f30
1 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,12 @@ export class LeftPanelView extends TemplateView {
|
|||
autocomplete: true,
|
||||
name: "room-filter",
|
||||
onInput: event => vm.setFilter(event.target.value),
|
||||
onKeydown: event => {
|
||||
if (event.key === "Escape" || event.key === "Esc") {
|
||||
filterInput.value = "";
|
||||
vm.clearFilter();
|
||||
}
|
||||
}
|
||||
});
|
||||
return t.div({className: "LeftPanel"}, [
|
||||
t.div({className: "filter"}, [
|
||||
|
|
Loading…
Reference in a new issue