remove getIcon prop

This commit is contained in:
Nancy Butler 2020-12-09 07:32:41 -07:00
parent fa4222adc1
commit 36a58022f0
3 changed files with 4 additions and 12 deletions

View File

@ -27,18 +27,10 @@ export default {
type: String,
default: null,
},
getIcon: {
type: Function,
default: null
}
},
computed: {
displayClass() {
if (this.getIcon) {
return this.getIcon(this.row);
}
if ( this.iconKey ) {
return get(this.row, this.iconKey);
}

View File

@ -137,8 +137,8 @@ export function init(store) {
{
name: 'isDefault',
labelKey: 'tableHeaders.default',
formatter: 'IconText',
formatterOpts: { getIcon: row => row.isCustom ? 'icon-checkmark icon-2x' : 'icon-x icon-2x' }
formatter: 'Checked',
value: 'isDefault'
},
AGE
]);

View File

@ -7,11 +7,11 @@ export default {
};
},
isCustom() {
isDefault() {
const { relationships = [] } = this.metadata;
if (!relationships) {
return;
return false;
}
return relationships.filter(rel => rel.fromType === CATALOG.APP ).length > 0;