Use $-assignments instead of store.set
This commit is contained in:
parent
dd2e180f9b
commit
3363c574c9
@ -31,12 +31,10 @@
|
||||
$: {
|
||||
switch (searchRange as SearchRange) {
|
||||
case SearchRange.Deck:
|
||||
displayedSearch = "deck:current";
|
||||
search.set(displayedSearch);
|
||||
$search = displayedSearch = "deck:current";
|
||||
break;
|
||||
case SearchRange.Collection:
|
||||
displayedSearch = "";
|
||||
search.set(displayedSearch);
|
||||
$search = displayedSearch = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -44,10 +42,10 @@
|
||||
$: {
|
||||
switch (revlogRange as RevlogRange) {
|
||||
case RevlogRange.Year:
|
||||
days.set(365);
|
||||
$days = 365;
|
||||
break;
|
||||
case RevlogRange.All:
|
||||
days.set(0);
|
||||
$days = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -55,7 +53,7 @@
|
||||
const searchKeyUp = (event: KeyboardEvent) => {
|
||||
// fetch data on enter
|
||||
if (event.key === "Enter") {
|
||||
search.set(displayedSearch);
|
||||
$search = displayedSearch;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user