Address Gouv Autocomplete Field
An autocomplete field which is a FetchAutocompleteField Props component configured for the
api-Adresse.data.gouv.
- Import
import { AddressGouvField } from '@smile/haring-react'; - Extends FetchAutocompleteField
- Source View Source Code
- Package @smile/haring-react
Storybook Docs
Props
| Name | Type | Default | Description |
|---|---|---|---|
| lat | string | '' | To be filled in to prioritize these latitude coordinates in the search results. |
| lon | string | '' | To be filled in to prioritize these longitude coordinates in the search results. |
| type | string | '' | To be filled in to reduce to specific type of results of the search. |
| onFetchData | (value: string) => Promise<IValue<IAddressGouvData>[]> | A default function getDataAddressGouv that makes a call to the api-adresse.gouv.fr API. | This callback function return field value to the parameters and to be return Promise<IValue<IAddressGouvData>[]> value. By default this props is defined. |
| ... | - | - | extends FetchAutocompleteField Props |
IAddressGouvData
| name | type | Description |
|---|---|---|
| city | string | Name of the city |
| housenumber | string | Number of the house |
| label | string | Resume label |
| postcode | string | Number of the postcode |
| street | string | Name of the street |