force a refresh when enter pressed

This commit is contained in:
Damien Elmes 2020-06-29 15:11:46 +10:00
parent 4a04ccd96c
commit 330ddeb313

View File

@ -79,7 +79,12 @@
const searchKeyUp = (e: KeyboardEvent) => { const searchKeyUp = (e: KeyboardEvent) => {
// fetch data on enter // fetch data on enter
if (e.keyCode == 13) { if (e.keyCode == 13) {
const wasSame = search == displayedSearch;
search = displayedSearch; search = displayedSearch;
if (wasSame) {
// force a refresh (user may have changed current deck, etc)
refresh();
}
} }
}; };