mirror of
https://github.com/ankitects/anki.git
synced 2026-01-14 06:23:57 -05:00
force a refresh when enter pressed
This commit is contained in:
parent
3c2231d5fd
commit
823e3b964c
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