Hello,
I have implemented a template for a column to display name of the month, rather than its numeric value say 1 or 5. To reiterate, the template returns 'January' for column value 1. On top of this I have enabled global filter.
<Column field="month" header="Month" body={this.monthTemplate} sortable />
The issue is that if I type 'January' in global filter, as expected no records are filtered; however, when I type 1, record that displays 'January' in month column is filtered.
If I replace the field value with a function that returns a value (January) for the key (1), it works with an expected warning "Failed prop type: Invalid prop `field` of type `function` supplied to `Column`, expected `string`.".
<Column field={monthFilter} header="Month" body={this.monthTemplate} sortable />
Please advise if there is a solution to the above problem.
Best Regards
Nitin
Filter on displayed values from global filter in DataTable
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
I think we can add globalFilterFunction property for this. Could you please create a github issue?
Best Regards,
I think we can add globalFilterFunction property for this. Could you please create a github issue?
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Posts: 1
- Joined: 22 Dec 2020, 11:11
The example above shows the Analysis Filter in use with a data table. ... The Analysis Filter is usually used to compare column data and a value you enter, but you can also directly ... The Global Filter panel will be displayed, as shown above. https://myhr.onl/myhr-savers/
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
???
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 18 guests