awesome-reactivesearch / airbeds

Airbeds app built with ReactiveSearch

Home Page:https://codesandbox.io/s/github/awesome-reactivesearch/airbeds/tree/master

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I am not able to restrict the search through different fields dynamically

abhinavgurung opened this issue · comments

Hello, so right now its searching across the name field. There are other fields like summary, space and description. If I pass it as an array it will search across all of them. But If I want to have a check box like if user checks description, it will be only searched across description. How can we acheive that.

@AGURUNG31 you can do something like that with a state setting the fields. In your example, if description is checked, then set that as a search field. If not, then set something else.

@siddharthlatest
Thanks for the reply. So right now my checkboxes are in the MultiDataList component. so does the MultiDataList selection will be known to CategorySearch component. I am new to react itself. when you say "set that as a search field", how is this achieved. Thanks

so you are saying, the the selected filters will be passed from the MultiDataList to search component, each time the selected filters of multidatalist component changes.