I'm trying to populate a table dynamically with cells component.
input structure looks like:
tableData: {
headers: ['1', '3', '2', '4'],
rows: [
[{h: '1', t: 'Sample', v: {name: 'logan'}},
{h: '2', t: 'Sample', v: {name: 'dgd'}},
{h: '3', t: 'Sample', v: {name: 'logasdn'}},
{h: '4', t: 'Sample', v: {name: 'loezgan'}}]
],
showHeaders: ['1', '2', '3']
}
the html sections looks like that:
<!--table data-->
<tr v-for='(row,rowIndex) in tableData.rows'>
<td><input type='checkbox'></td>
<td v-for="(element,colIndex) in row">
<component is='Sample' v-bind='element.v' ></component>
</td >
</tr>
When I pass 'Sample' (the component name) as parameter it works, but its not when I replace 'Sample' by 'element.t' or {{element.t}} which I don't understand.
Does anyone knows why its not working and how to do that?
rows.