I have created a new search box specific to one field search, exact search. how can i make it case insensitive?

I have created 2 search box with react-search-ui out of box library.
one search for specific field search with exact match and other generic search that search all, like below :

Since the exact search is implemented using below:
onClick={() => {
setFilter(field, value);

Is there a way to make the search insensitive ? or can i change the setFilter to something else to work ?

Are you able to normalize your data?

So normalize the source field to be lower-case, and then also lower-case your filter value before applying it.

Another thing to try would be try quoting the keyword:

onClick={() => {

Not sure how that would work, but something to try.

it doesnt filter on that specific field though right ?

No we dont want to normalize the data. is it possible from the code base itself to do the case insentivity check ?

where to set the field name on the setSearchTerm?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.