MLH-Fellowship / prep-project-4.1.1

MLH Prep Project for Pod 4.1.1
https://mlh-prep-4-1-1.netlify.app/
MIT License
6 stars 13 forks source link

Autocomplete for cities #6

Closed wrussell1999 closed 2 years ago

wrussell1999 commented 2 years ago

At the moment, when you type in a city, it won't help you finish your entry with suggestions. A cool feature would be if it had a drop down menu that suggested locations similar to the name. For example, if I type in Cambridge, it could tell me Cambridge, MA, USA or Cambridge, UK to help users get the right answers!

quachtridat commented 2 years ago

I can take a stab at this.

Tanmay000009 commented 2 years ago

Hey @quachtridat and @Hemansh31 , had a suggestion. We have made PR #23, in which we store the most recent 5 searches of a user. So using that, you can show the autocomplete results even when the search bar is empty, as search engines do, ex. Google.

Me, @ShiviPro and @khattakdev have had a discussion about same at #12.

If you like the suggestion, and need any help feel free to tag @ShiviPro or me anywhere😊 .

quachtridat commented 2 years ago

@Tanmay000009 I do think having recent searches pop up while the search bar is empty is a good idea. I believe it can be implemented fairly quickly because you guys solve #12 by storing data in local storage (#23) and having a React state for it.