Skip to content

Instantly share code, notes, and snippets.

@abhinavraj23
Created December 29, 2019 20:50
Show Gist options
  • Save abhinavraj23/312fd03852ea50a27638a5b4871c1736 to your computer and use it in GitHub Desktop.
Save abhinavraj23/312fd03852ea50a27638a5b4871c1736 to your computer and use it in GitHub Desktop.
<DataSearch
componentId={id}
dataField="original_title"
URLParams
className="search-container"
showIcon={false}
autosuggest={true}
react={{ and: ["ResultList"] }}
iconPosition="right"
innerClass={{ input: "search-input", list: "search-list" }}
render={this.renderCustomSuggestions()}
value={this.state.v}
onChange={(value, trigger, event) => {
this.handleSearchClick(value);
}}
onValueChange={value => {
this.getPopularSearches(value);
}}
onValueSelected={(value) => {
history.push(`/search/?Movie="${value}"`);
window.location.reload();
}}
URLParams="true"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment