How to get the Country-State-City selector in just one SelectMenu conditionally in reactJs? (not duplicate)

The solution for a question related to this is already existing over the stack overflow, but there is huge difference .
The former questions on this topic is related to have 3 select menus viz,
one dropdown for selecting country
2nd dropdown for selecting state
3rd dropdown for selecting city.

But, I dont want 3 cascading dropdowns, rather I want them to get clubbed together to a single dropdown. ( mainly location), which would take care of the city, country, state, based on what is being typed into the textField for selectMenu.

Just like Linkdin’s select employee menu..

could anyone tell me what could be the possible data schema of menu items, for linkedsIn select menu?.
do it have seperate values with ids like
cities (all cities in the globe), countries (all countries in the globe), (all states in the globe), and they got clubbed together based on their primary keys acting as the foreign key for other data, say primary key for country act as the foreign key for state and so on , so forth?

I just want to know, how could I achieve the cascade country, state, city select but with only a single select menu?

I am using ReactJs and Material UI as my front-end UI library

All suggestions would highly be valued.