React-bootstrap-table2: Question: Exact Match Text Filter

Created on 21 Jun 2019  路  4Comments  路  Source: react-bootstrap-table/react-bootstrap-table2

Is it possible to have a text filter for a table header column that filters only by an exact match.

So for example when filtering a column by "MALE", only "MALE" entries would appear, instead of both "MALE" and "FEMALE" (since "MALE" is a sub-string) ?

If not, are there any workarounds?

Thanks!

Most helpful comment

I did. I simply set the condition to 'eq':

filter={ { type: 'SelectFilter', condition: 'eq' } }

All 4 comments

@oscarreyes98 did you find a solution to this?

I did. I simply set the condition to 'eq':

filter={ { type: 'SelectFilter', condition: 'eq' } }

Do you have a sample code? If yes, please share. I am struggling to find a fix for that.

Simply like this:

<TableHeaderColumn
   filter={{
      type: 'SelectFilter',
      condition: 'eq'
}} />
Was this page helpful?
0 / 5 - 0 ratings

Related issues

josefheld picture josefheld  路  3Comments

thevangelist picture thevangelist  路  4Comments

cnav007 picture cnav007  路  4Comments

nskiro picture nskiro  路  4Comments

kamarajuPrathi picture kamarajuPrathi  路  4Comments