linstrom/frontend-reactive/app/components/util/multiselect.hbs
mStar 07614e9a6d Add checkbox based multiselect util component
Takes an array of objects (name, checked, description) and turns it into
a list of checkboxes, one for each element
2024-10-25 10:52:43 +02:00

13 lines
No EOL
325 B
Handlebars

<div class={{@wrapper-class}}>
{{#each this.args.elements as |element|}}
<label class={{@label-class}}>
{{element.description}}
<Input
@type="checkbox"
name="{{element.name}}"
@checked={{element.checked}}
{{on "change" this.onChange}}
/>
</label>
{{/each}}
</div>