Skip to content

Instantly share code, notes, and snippets.

@Rizary
Created September 24, 2017 11:28
Show Gist options
  • Save Rizary/934a6f4a7bec2c06330c15aea04f702b to your computer and use it in GitHub Desktop.
Save Rizary/934a6f4a7bec2c06330c15aea04f702b to your computer and use it in GitHub Desktop.
eval (HandleSearchBox st str next) = do
let packages = _.name <$>
Arr.filter (packageContained str) st.package
_ <- H.subscribe
(H.eventSource
(\k -> J.select "#search" >>= Misc.autocomplete { source: packages
, select: k
})
(\a -> Just $ SearchBoxChange (a.item.value) H.Listening))
pure next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment