Autocomplete can be implemented any number of ways in regard to how the suggestions are filtered and presented and for this article I am going to use restcountries API to get a list of suggestions (Countries) passed to Antd Auto-Complete component.

As the user types, we will filter the results and only show the suggestions that contain the user’s input anywhere in the suggestion.

I used the Auto-Complete component provided by Ant Design library

Here are the important steps:

There are many parameters that the component takes in but to achieve the above mentioned steps we need only,

Mithilesh Kohale

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store