geocodeearth / autocomplete-element

A custom element for use with the Geocode Earth Autocomplete API.
https://geocode.earth
MIT License
8 stars 1 forks source link

Value #22

Closed anupammaurya6767 closed 2 years ago

anupammaurya6767 commented 2 years ago

failed to get the value of input

orangejulius commented 2 years ago

Hi @anupammaurya6767,

I already answered your question via support email, but for anyone else, the Autocomplete Element fires events that let you use the input value, the value of the selected result, etc in Javascript.

There are some examples in the example directory and on this CodePen

missinglink commented 2 years ago

There is some code which should set the 'value' property on the host element.

https://github.com/geocodeearth/autocomplete-element/blob/main/src/index.js#L38