diff --git a/src/components/my-table.vue b/src/components/my-table.vue
index 7d385b0..5a41a79 100644
--- a/src/components/my-table.vue
+++ b/src/components/my-table.vue
@@ -13,7 +13,7 @@
- {{ r[c.prop] }}
+ {{ getProp(r, c.prop) }}
{{ c.render(r) }}
|
@@ -51,6 +51,16 @@ export default {
orderBy: col,
orderDesc: false
});
+ },
+ getProp(row, prop) {
+ let props = prop.split('.');
+ let val = row;
+ props.forEach((p) => {
+ if (typeof val == 'object') {
+ val = val[p];
+ }
+ });
+ return val;
}
}
}
diff --git a/src/components/userlist.vue b/src/components/userlist.vue
index 519fa5d..f2586a5 100644
--- a/src/components/userlist.vue
+++ b/src/components/userlist.vue
@@ -26,10 +26,14 @@ export default {
prop: 'Username',
orderBy: 'username'
},
+ {
+ heading: 'Reseller',
+ prop: 'Reseller.Username'
+ },
{
heading: 'Render',
render(row) {
- return row.ID;
+ return 'ID:' + row.ID;
}
}
],