DEV Community

loading...

Discussion on: Lessons learned from my first 10k LOC in Elm

Collapse
herteby profile image
Simon Herteby

Two tips for the Select wrapper:

  • Since only one option can be selected at a time, you can model that by having a selected: Maybe option argument for the whole Select, instead of setting it per option.
  • With some tricks you can make Selects work with any type, not just Strings!

Here's a demo :) ellie-app.com/7253Q8THR2xa1

Collapse
rametta profile image
Jason Author

That's great, thank you Simon!