An AddressPicker component.
yarn add @lendi/address-picker
Before using this component, please add the following googlemap script to your application's head.
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDedPUSXQBIHOiI_Mrw5aKTGEy4I9GX3sY&libraries=geometry,places,visualization"></script>
import AddressPicker from '@lendi/address-picker';
<AddressPicker />;
Name | Description | Default |
---|---|---|
onChange: | On change from autosuggest only (e: SyntheticEvent<Element, Event>) => void
|
|
onSelectAddress | When user selects the address - either from 'save' on manual entry or by selecting a suggestion from autosuggest (selection: AddressObject, formatString?: string) => void
|
|
country | A two letter code corresponding to a country. Refer to ISO 3166-1 string
|
'au' |
dataset | Determines which address file to search, i.e. GNAF (Geoscape Australia’s Geocoded National Address File) or PAF (Australia Post's Postcode Address File) 'GNAF' 'PAF'
|
'GNAF' |
isDisabled | Disable the Autocomplete input boolean
|
|
onReset | On reset, do a thing () => void
|
|
regionSearchOnly | Allow user to search cities or postcodes only boolean
|
|
size | Size of input ListSize
|
'md' |
value | string |
|
manualAddressInputType | Determines if postal address option is visible in manual input modal. (residential, postal, both) 'both' 'residential' 'postal'
|
|
onException | Explicit onException handler (e: Error) => void
|