csauvage / react-algolia-places

A simple but powerful React.js wrapper around fantastic Algolia's place !
11 stars 5 forks source link

Reset field on location selected #4

Open prevostc opened 6 years ago

prevostc commented 6 years ago

In my project, I need to select multiple locations and reset the field when a location is selected. I forked and called autocomplete.setVal("") manually on change, but this is not ideal. Is there another way?

csauvage commented 6 years ago

Can you precise your use case ? Maybe a gif ? I don't see want u want to perform.

prevostc commented 6 years ago

I want to let the user select multiple places. He selects begins typing something, say "paris", clicks "Paris 10ème arrondissement", the input field value get changed for "Paris 10ème arrondissement". I would like the input field to be empty after "Paris 10ème arrondissement" is selected, so that my users can type in something else again