diff --git a/src/types.ts b/src/types.ts index 90f89c2f..ce8df183 100644 --- a/src/types.ts +++ b/src/types.ts @@ -467,6 +467,7 @@ export interface RadarAutocompleteUIOptions { limit?: number, // Maximum number of autocomplete results layers?: RadarGeocodeLayer[]; countryCode?: string; + expandUnits?: boolean; placeholder?: string, // Placeholder text for the input field onSelection?: (selection: any) => void, onRequest?: (params: RadarAutocompleteParams) => void, diff --git a/src/ui/autocomplete.ts b/src/ui/autocomplete.ts index 3060c261..db836f66 100644 --- a/src/ui/autocomplete.ts +++ b/src/ui/autocomplete.ts @@ -226,13 +226,14 @@ class AutocompleteUI { } public async fetchResults(query: string) { - const { limit, layers, countryCode, onRequest } = this.config; + const { limit, layers, countryCode, expandUnits, onRequest } = this.config; const params: RadarAutocompleteParams = { query, limit, layers, countryCode, + expandUnits, } if (this.near) {