A
A
Andrey Neumyvanny2021-09-17 09:01:28
React
Andrey Neumyvanny, 2021-09-17 09:01:28

Application on Next.js. How to implement a search on the city object?

I am developing an application on Next.js. I can not understand how to properly organize the structure of the search for cities.
There is such a data structure:
61442e7f73745459669268.png

I need to immediately start filtering on input to the input and pass this filtered object for drawing. That is, by changing the state, I hide or show the fields from the object. The peculiarity is that you need to show the entire area if at least one occurrence is found, and also how to highlight this / these occurrences visually, which class can hang.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question