Fix dot notation support in table row

While keeping it functional

Fixes #5080
This commit is contained in:
rijkvanzanten
2021-04-15 11:33:24 -04:00
parent 8af2cbadfa
commit f6a1043c6f

View File

@@ -18,7 +18,18 @@
<td class="cell" :class="`align-${header.align}`" v-for="header in props.headers" :key="header.value">
<slot :name="`item.${header.value}`" :item="props.item">
<v-text-overflow v-if="props.item[header.value]" :text="props.item[header.value]" />
<v-text-overflow
v-if="
header.value.split('.').reduce((acc, val) => {
return acc[val];
}, props.item)
"
:text="
header.value.split('.').reduce((acc, val) => {
return acc[val];
}, props.item)
"
/>
<value-null v-else />
</slot>
</td>