@lendi/address-picker
An AddressPicker component.
This project is forked from @lendi-ui/address-picker
Installation
yarn add @lendi/address-picker
Usage
When using this component, googlemap api script link is needed.
<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' | |