Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Optional api_key

api_key: string

Optional baseUrl

baseUrl: string

Optional checkKey

checkKey: boolean

An optional field to check whether the key is usable against the Ideal Postcodes API. This should be used in conjunction with the onFailedCheck callback to specify the necessary behaviour when the API Key is not in a usable state. This is false by default.

Optional filter

filter: [string]

inputField

inputField: string

CSS selector which specifies the input field which the autocomplete interface should bind

Optional licensee

licensee: string

Optional onAddressRetrieved

onAddressRetrieved: function

Optional callback. This function is invoked when the autocomplete client has retrieved a full address from the API following a user accepting a suggestion. The first argument is an object representing the address that has been retrieved.

Type declaration

Optional onAddressSelected

onAddressSelected: function

Optional callback. This function is invoked immediately after the user has selected a suggestion (either by click or keypress). The first argument is an object which represents the suggestion selected.

Type declaration

Optional onBlur

onBlur: function

Invoked when the user unfocuses from the address input field

Type declaration

    • (): void
    • Returns void

Optional onClose

onClose: function

Invoked when autocomplete suggestion box is closed (i.e. hidden from user)

Type declaration

    • (): void
    • Returns void

Optional onFailedCheck

onFailedCheck: function

Optional callback. This function is invoked when checkKey is enabled and the key is discovered to be in an unusable state (e.g. daily limit reached, no balance, etc).

Type declaration

    • (): void
    • Returns void

Optional onFocus

onFocus: function

Invoked when user selects or focuses address input field

Type declaration

    • (): void
    • Returns void

Optional onInput

onInput: function

Invoked when input is detected on address input field

Type declaration

    • (event: Event): void
    • Parameters

      • event: Event

      Returns void

Optional onLoaded

onLoaded: function

Optional callback. This function is invoked when autocomplete has been successfully attached to the input element.

Type declaration

    • (): void
    • Returns void

Optional onOpen

onOpen: function

Invoked when autocomplete suggestion box is opened (i.e. presented to the user)

Type declaration

    • (): void
    • Returns void

Optional onSearchError

onSearchError: function

Optional callback. This function is invoked when an error has occurred following an attempt to retrieve an address suggestion or full address. The first argument is an error instance (i.e. inherits from Error) representing the error which has occurred.

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

Optional onSelect

onSelect: function

Invoked when an address suggestion in suggestion box is selected

Type declaration

Optional onSuggestionsRetrieved

onSuggestionsRetrieved: function

Optional callback. This function is invoked immediately after address suggestions are retrieved from the API. The first argument is an array of address suggestions.

Type declaration

outputFields

outputFields: AddressFields

An object specifying where address field data points should be piped. Please find a complete list of address fields in the documentation. The attribute of the document should be the same as the address attribute as found in the documentation. E.g. line_1, post_town, postcode. You may use a CSS selector (string) or array of CSS selector strings. E.g. { line_1: "#line_1"} or { line_1: ["#line_1", "#premise"]

Optional removeOrganisation

removeOrganisation: boolean

Optional. An optional field to remove organisation name from address lines. Be aware that for some large organisation postcodes, the organisation name is the only identifying premise element of an address. This is false by default.

Optional strictAuthorisation

strictAuthorisation: boolean

Optional tags

tags: [string]

Optional titleizePostTown

titleizePostTown: boolean

An optional field to convert the case of the Post Town from upper case into title case. E.g. "LONDON" becomes "London". Default is false

Optional tls

tls: boolean

Optional version

version: string