I've been building a search UI with ReactiveSearch. I'm trying to figure out how to submit the actual search query. I've been using the DataSearch component because it comes with autocomplete baked in (just set it to true!). The autocomplete works fine. Suggestions are shown, I'm able to select them, BUT there are no actual search results when I select a suggestion by clicking on it or pressing enter.
Here is my DataSearch
<DataSearch
placeholder="Search..."
componentId="q"
dataField={["firstname"]}
queryFormat="or"
className="navbar-search-box"
icon={(<i className="fa fa-search fa-lg" style={searchIcon}></i>)}
showIcon={true}
iconPosition="right"
URLParams={true}
innerClass={{
title: "text-title",
input: "text-input",
list: "text-item"
}}
react = {{
"or": ["q"]
}}
onValueSelected={(value, cause, source) => {
this.setState({redirect:true});
}
}
onQueryChange = {
(prevQuery, nextQuery) => {
console.log('prevQuery', prevQuery);
console.log('nextQuery', nextQuery);
}
}
...
I'm assuming I don't need to use their appbase-js library to submit a full-text search query to ES. I'm assuming the DataSearch component puts the query together as long as you have the dataField
propery assigned a value.
I also get this error when I try to submit a query:
Warning: Each child in an array or iterator should have a unique "key" prop.
Maybe that has something to do with the search query not working? Not sure.