Data Table Column Arrays

UI Components for React
Post Reply
kevinquinn1918
Posts: 9
Joined: 26 Aug 2020, 14:14

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

Code: Select all

<Column body={benefitTemplate0} header={`Benefit[0]`} />
to

Code: Select all

<Column field='benefit[0]'  header={`Benefit[0]`} />
I'm curious why the field parameter has to be a string?

Thanks,
Kevin

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests