Skip to content

Instantly share code, notes, and snippets.

@chiliec
Last active November 14, 2017 17:50
Show Gist options
  • Save chiliec/189c2ab3c6b24a2df211ee8de21ed697 to your computer and use it in GitHub Desktop.
Save chiliec/189c2ab3c6b24a2df211ee8de21ed697 to your computer and use it in GitHub Desktop.
<SearchkitAutosuggest
placeholder=" "
highlightFirst={true}
autofocus={true}
queryHandler={
new QueryAccessor("q", {
queryFields: ["full_address"],
queryOptions: {}
})
}
sources={[
new QuickHitsDatasource({
title: "Возможные варианты",
searchFields:["city", "street^2", "building^3", "full_address^5"],
sourceFields:["city", "street^2", "building^3", "full_address^5"],
onSelect:(item)=> {
return item._source.full_address
},
itemRenderer:(item)=>{
return <span>{item._source.full_address}</span>
},
size: 12
})
]}/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment