Using filter property of PrimeReact DataTable Columns

UI Components for React
Post Reply
arojsubedi
Posts: 1
Joined: 11 Jun 2020, 20:18

11 Jun 2020, 20:26

One of the columns of the DataTable implemented is somewhat like this

{ field: 'FieldValuesAsText#XYZ', header: 'XYZ', width: '150px', sort: true, filterElement: 'No' }
<Column key={col.field} field={col.field} header={col.header} body={this.trimContent} filter={true} filterMatchMode="contains" sortable={col.sort} />


The FieldValuesAsText is a object with XYZ as one of it's attribute. The custom function used in the body property successfully retrieves the value but the problem is when I try to do the filter operation. Since the filter defaults to field which in this case is FieldValuesAsText#XYZ, so it is obviously going to return undefined. How will I be able to make my filter property work?

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: Gudlarajesh and 8 guests