fix: sync search page state with $effect for Svelte 5 reactivity
Author: Aaron Steven White
Commit
136ec9bd3b5379ce7d63bc2b559e6eead89428a9Parent: a00507c1cf
Structural diff unavailable
These commits were pushed via plain git push, so no pre-parsed
schemas are available. Install git-remote-cospan and re-push via panproto:// to
see scope-level changes, breaking change detection, and semantic diffs.
brew install panproto/tap/git-remote-cospan1 file changed +8 -2
@@ -5,11 +5,17 @@
55 66 let { data } = $props(); 77 8- let initialQuery = data.query ?? ''; 9- let inputValue = $state(initialQuery); 8+ let inputValue = $state(data.query ?? ''); 109 let mode = $state(data.mode ?? 'repos'); 1110 let anchor = $state(data.anchor ?? 'function'); 1211 12+ // Sync state when data changes (e.g., browser navigation) 13+ $effect(() => { 14+ inputValue = data.query ?? ''; 15+ mode = data.mode ?? 'repos'; 16+ anchor = data.anchor ?? 'function'; 17+ }); 18+ 1319 const debouncedSearch = debounce((q: string) => { 1420 if (q.trim()) { 1521 const params = new URLSearchParams({ q: q.trim(), mode });