I don’t necessarily want to make it exactly look like that, but I want to find a way which lets me remove all the boilerplate code. Pretty much my issues is that I need a way which lets me define the available elements within the block. Any ideas?
(I am aware of power-select, but it’s just too heavy for our needs)
Yeah I know what you mean RE power select. I’ve used emberx-select in the past but with Octane it’s super easy to write a little select component like what you’re describing. This is a very basic one I wrote recently:
Note that the select component uses the pick helper from ember-composable-helpers in order to avoid creating a backing js class with the action. So it would either require using ember composable helpers or defining a js class for the select component with the action handler.
Hey @Hummingbird, <select> elements have always seemed a bit strange in Ember.
I’ve been using Zestia’s native select box for years. Rather than author your own, consider using their addon?