Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
Use option labels on detail screens
Browse files Browse the repository at this point in the history
  • Loading branch information
fourstacks committed Sep 3, 2018
1 parent db21620 commit e5b58cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions resources/js/mixins/RepeaterDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ export default{
let keys = Object.keys(row);

return keys.map(key => {
let subField = this.field.sub_fields.find(field => field.name === key);
let value = (['select'].some(type => type === subField.type))
? subField.options[row[key]]
: row[key];
return {
label: this.field.sub_fields.find(field => field.name === key).label,
value: row[key]
label: subField.label,
value: value
}
});
})
Expand Down

0 comments on commit e5b58cd

Please sign in to comment.