You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 };
})
);
}
The text was updated successfully, but these errors were encountered:
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 };
})
);
}
The text was updated successfully, but these errors were encountered: