Unlock search suggestions properly (real)

This commit is contained in:
Cadence Ember 2023-02-10 23:53:38 +13:00
parent 0b858cf426
commit 5fa6e2fb9e
Signed by: cadence
GPG key ID: BC1C2C61CF521B17

View file

@ -64,6 +64,7 @@ render(html`<${SuggestionList} />`, eSuggestions)
// input view // input view
effect(() => { effect(() => {
query.value // dependency should always be tracked
if (st.peek() === "accepted") return // lock results from changing during navigation if (st.peek() === "accepted") return // lock results from changing during navigation
st.value = "loading" st.value = "loading"
fetchSuggestions(query.value).then(res => { fetchSuggestions(query.value).then(res => {