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