ember-cli-materialize
ember-cli-materialize copied to clipboard
Selectable bug
When I have a 1-n relation to be visualized by md-checks, I want to have the record to be the value in order to use standard ds. there is no proper option to use optionValuePath='content' optionLabelPath='content.name'
I would suggest following improvement to addon/components/selectable-item-group.js
if (valuePath && labelPath) { return A( content.map(el => { return { value: get(el, valuePath), label: get(el, labelPath) }; }) ); } else if (labelPath) { // new option - has a label, but object == value return A( content.map(el => { return { value: el, label: get(el, labelPath) }; }) ); } else { return A( content.map(el => { return { value: el, label: el }; }) ); }