fix: wire the search to the store
This commit is contained in:
@@ -4,8 +4,18 @@
|
|||||||
Updates the global filterManager query to filter the font list.
|
Updates the global filterManager query to filter the font list.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { filterManager } from '$features/GetFonts';
|
import { fontStore } from '$entities/Font';
|
||||||
|
import {
|
||||||
|
filterManager,
|
||||||
|
mapManagerToParams,
|
||||||
|
} from '$features/GetFonts';
|
||||||
import { SearchBar } from '$shared/ui';
|
import { SearchBar } from '$shared/ui';
|
||||||
|
import { untrack } from 'svelte';
|
||||||
|
|
||||||
|
$effect(() => {
|
||||||
|
const params = mapManagerToParams(filterManager);
|
||||||
|
untrack(() => fontStore.setParams(params));
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="p-6 border-b border-black/5">
|
<div class="p-6 border-b border-black/5">
|
||||||
|
|||||||
Reference in New Issue
Block a user