mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
clear filter on esc
This commit is contained in:
parent
ddbe3305c8
commit
0d6fe32f30
@ -27,6 +27,12 @@ export class LeftPanelView extends TemplateView {
|
|||||||
autocomplete: true,
|
autocomplete: true,
|
||||||
name: "room-filter",
|
name: "room-filter",
|
||||||
onInput: event => vm.setFilter(event.target.value),
|
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"}, [
|
return t.div({className: "LeftPanel"}, [
|
||||||
t.div({className: "filter"}, [
|
t.div({className: "filter"}, [
|
||||||
|
Loading…
Reference in New Issue
Block a user