Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 879 Bytes

search-ui-react.updatelocationifneeded.md

File metadata and controls

26 lines (16 loc) · 879 Bytes

Home > @yext/search-ui-react > updateLocationIfNeeded

updateLocationIfNeeded() function

If the provided search intents include a 'NEAR_ME' intent and there's no existing user's location in state, retrieve and store user's location in headless state.

Signature:

export declare function updateLocationIfNeeded(searchActions: SearchActions, intents: SearchIntent[], geolocationOptions?: PositionOptions): Promise<void>;

Parameters

Parameter Type Description
searchActions SearchActions
intents SearchIntent[]
geolocationOptions PositionOptions

Returns:

Promise<void>