mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Make search in stats page trigger onChange (#2428)
This commit is contained in:
parent
7fbff43a58
commit
9b5148185a
2 changed files with 4 additions and 6 deletions
|
@ -114,6 +114,7 @@ Kaben Nanlohy <kaben.nanlohy@gmail.com>
|
||||||
Tobias Predel <tobias.predel@gmail.com>
|
Tobias Predel <tobias.predel@gmail.com>
|
||||||
Daniel Tang <danielzgtg.opensource@gmail.com>
|
Daniel Tang <danielzgtg.opensource@gmail.com>
|
||||||
Jack Pearson <github.com/jrpear>
|
Jack Pearson <github.com/jrpear>
|
||||||
|
yellowjello <github.com/yellowjello>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -55,12 +55,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchKeyUp(event: KeyboardEvent): void {
|
function updateSearch(): void {
|
||||||
// fetch data on enter
|
|
||||||
if (event.code === "Enter") {
|
|
||||||
$search = displayedSearch;
|
$search = displayedSearch;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const year = tr.statisticsRange_1YearHistory();
|
const year = tr.statisticsRange_1YearHistory();
|
||||||
const deck = tr.statisticsRangeDeck();
|
const deck = tr.statisticsRangeDeck();
|
||||||
|
@ -89,7 +86,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
bind:value={displayedSearch}
|
bind:value={displayedSearch}
|
||||||
on:keyup={searchKeyUp}
|
on:change={updateSearch}
|
||||||
on:focus={() => {
|
on:focus={() => {
|
||||||
searchRange = SearchRange.Custom;
|
searchRange = SearchRange.Custom;
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in a new issue