1
Fork 0

Merge pull request from alexeyzab/add-missing-example-to-docs

Add missing tutorial code
This commit is contained in:
Chris Cornwell 2018-10-31 18:53:34 -07:00 committed by GitHub
commit 628efa7445
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,6 +166,10 @@ type ChildQuery item = Select.Query Query item
`item` is the type of whatever items you want to be selectable. Commonly these are strings, but can also be custom data types. Later on, in the [typeahead tutorial](https://citizennet.github.io/purescript-halogen-select/tutorials/typeahead), we'll see how powerful custom data types can be for rendering purposes. For our simple dropdown we'll simply specialize this to `#!hs String`:
```hs
type ChildQuery = Select.Query Query String
```
Now that `Select` has been imported and we've updated our `ChildQuery` and `ChildSlot` types to support it, we can worry about what to do when we receive a message from the component.