datatable dynamic column header name

UI Components for React
Post Reply
Posts: 1
Joined: 04 Feb 2020, 09:27

04 Feb 2020, 10:46

for example I have this data from backends:


and then in react, I need to configure header with "displayName" from data above

<DataTable value={this.state.item}>
<Column field="id.value" header="id.displayName" />
<Column field="name.value" header="name.displayName" />
<Column field="price.value" header="price.displayName" />

but the result, header displays "xxxxx.displayName" instead the real display name from the data. I've tried using {id.displayName}, but error occured "id is not defined"

how can I achieve this? Thanks

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest