mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02: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>
|
||||
Daniel Tang <danielzgtg.opensource@gmail.com>
|
||||
Jack Pearson <github.com/jrpear>
|
||||
yellowjello <github.com/yellowjello>
|
||||
|
||||
********************
|
||||
|
||||
|
|
|
@ -55,11 +55,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
}
|
||||
}
|
||||
|
||||
function searchKeyUp(event: KeyboardEvent): void {
|
||||
// fetch data on enter
|
||||
if (event.code === "Enter") {
|
||||
$search = displayedSearch;
|
||||
}
|
||||
function updateSearch(): void {
|
||||
$search = displayedSearch;
|
||||
}
|
||||
|
||||
const year = tr.statisticsRange_1YearHistory();
|
||||
|
@ -89,7 +86,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
<input
|
||||
type="text"
|
||||
bind:value={displayedSearch}
|
||||
on:keyup={searchKeyUp}
|
||||
on:change={updateSearch}
|
||||
on:focus={() => {
|
||||
searchRange = SearchRange.Custom;
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue