Add icon to clear the current search

This commit is contained in:
John R. Supplee 2021-03-28 02:46:11 +02:00
parent 39b4ada26d
commit 20a2ea3e7a
2 changed files with 9 additions and 0 deletions

View file

@ -249,6 +249,13 @@ class GlobalSearchComponent extends CardSearchPagedComponent {
);
document.getElementById('global-search-input').focus();
},
'click .js-new-search'(evt) {
evt.preventDefault();
const input = document.getElementById('global-search-input');
input.value = '';
this.query.set('');
this.hasResults.set(false);
},
},
];
}