Created
September 24, 2017 11:28
-
-
Save Rizary/934a6f4a7bec2c06330c15aea04f702b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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