React-bootstrap-table2: custom filter function

Created on 3 Aug 2018  路  5Comments  路  Source: react-bootstrap-table/react-bootstrap-table2

Basically I want to add custom filter logic. Something like below.

columns = {[ ...,
{ dataField: 'name',
text: 'Product Name',
filter: textFilter(),
customOnFilterCallback: (column, value) = {
// filteredColumn = custom filter logic on column data
return filteredColumn;
}];
};

good first issue help wanted

All 5 comments

Hello, @narayanchoudhary

Right now the only workaround is you have to enable the remote on filters

this is a quick introduction for remote mode, and here is a remote filtering example.

However, I think I will consider to implement a onFilter function just like your idea in near future.

Thanks

This is great @AllenFang
Thanks you so much for this amazing library. I will definitely donate to this library. If I will able to make money from the product I am developing.

Thanks @narayanchoudhary I also open to accept the donate. However, I'm in Taiwan, but it's not easy to connect paypal with local bank... lol

Hi @AllenFang
Currently, The onFilter function filter the columns by like query. I want to use https://github.com/farzher/fuzzysort algorythm. Please check it out.
Thanks

Fixed, please check RELEASE NOTE

Check EXAMPLE

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rsgoss picture rsgoss  路  4Comments

nskiro picture nskiro  路  4Comments

epsyan picture epsyan  路  4Comments

thevangelist picture thevangelist  路  4Comments

prajapati-parth picture prajapati-parth  路  4Comments