O
O
Oleg2015-11-19 11:54:31
JavaScript
Oleg, 2015-11-19 11:54:31

Are there plugins/solutions for autocomplete in two steps?

For example, an address entry field:
1. Until you enter a street, send requests for an address that returns a list of streets starting with the entered letters.
2. As soon as a street is chosen, the list of houses on this street is loaded - and a choice of houses is offered.
3. Changed their minds - erased the street - again step 1

How to make 2 inputs the question does not arise. You can even "place" one under the other, hang events and, depending on what you need at the moment, make the desired input top, while setting focus.
But I don't like this solution. Are there any libraries that have this functionality?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Lukyanov, 2015-11-19
@LastDreamer

There is a nice select2 component . I advise you to look in his direction.
In our project, with its help, we made the choice of KLADR.
Similarly implemented in the service "KLADR in the cloud" (example)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question