@lendi/address-picker
v2.12.0
Published
An AddressPicker component.
Downloads
695
Maintainers
Keywords
Readme
@lendi/address-picker
An AddressPicker component.
Installation
yarn add @lendi/address-picker
Usage
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 />;
Props
| 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
| |