Hi, all!
I would like to dynamically set cell editor for treetable
depend on type of data I’ve in data collection.
For instance, I have data smth like this:
data: [
{
name: 'Header number 1',
open: true,
data: [
{
name: 'Identifier',
representation: 'text',
value: 'sdfsdf',
},
{
name: 'Item name',
representation: 'text',
value: 'weoijojij',
},
{
name: 'Accessible',
representation: 'checkbox',
value: 'true,
},
]
{
name: 'Header number 2',
open: true,
data: [
{
name: 'Variants',
representation: 'select',
value: 'tioyituotuy',
},
{
name: 'new',
representation: 'checkbox',
value: 'false',
},
{
name: 'Grade',
representation: 'select',
value: 'oiutoyurty',
},
]
},
So, if the data in a cell that corresponds to represention: 'select'
then I want to set editor ‘select’ to than cell, if the data has representation: 'checkbox'
, then there is an editor ‘checkbox’ in corresponding cell.
I can manually change editors while configuring component, but manually I can’t set various editors depend on ‘representation’ property value.
Thanks in advance.