mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
force a refresh when enter pressed
This commit is contained in:
parent
4a04ccd96c
commit
330ddeb313
1 changed files with 5 additions and 0 deletions
|
@ -79,7 +79,12 @@
|
|||
const searchKeyUp = (e: KeyboardEvent) => {
|
||||
// fetch data on enter
|
||||
if (e.keyCode == 13) {
|
||||
const wasSame = search == displayedSearch;
|
||||
search = displayedSearch;
|
||||
if (wasSame) {
|
||||
// force a refresh (user may have changed current deck, etc)
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue