@siteone/react-address-suggester
v2.1.15
Published
This is a solution for suggesting addresses. It is thin layer built on top of [react-autosuggest](https://github.com/moroshko/react-autosuggest), communicating with our address server.
Downloads
2
Keywords
Readme
Address Suggester
This is a solution for suggesting addresses. It is thin layer built on top of react-autosuggest, communicating with our address server.
Installation
Install this package and all peer dependencies.
yarn add @siteone/react-address-suggester
Usage
import Suggester from '@siteone/react-address-suggester'
<Suggester apiKey="abcde" onChange={(suggestion) => console.log("onChange", suggestion)} />
API
This library has only one export - the Suggester component.
Suggester
- value:
string
the default input value for the suggester's text input (optional) - onChange:
function
to be called after suggestion is selected - apiKey:
string
API token given by our backend
All extra props will be passed to react-autosuggest component