Data Table Column Arrays
Posted: 01 Jun 2021, 13:28
I'm using a Data Table that has a dynamic array of columns in it. The column fields, only accept strings and not numbers or array elements. I have a workaround for this, but it's not pretty. Is there any way I can specify an array element, in the field. Please look below:
I would like to change this
to
I'm curious why the field parameter has to be a string?
Thanks,
Kevin
I would like to change this
Code: Select all
<Column body={benefitTemplate0} header={`Benefit[0]`} />
Code: Select all
<Column field='benefit[0]' header={`Benefit[0]`} />
Thanks,
Kevin