Ask questionsAdd typeahead fields to admin dashboard for region

On the Place model, we have a String field called "Region".

Currently the admin dashboard for Place allows you to type in any String for that field.

Let's update the UI so that when you start typing into the field, you see a drop down list of matching options that already exist on other Places in the dashboard.

Add an event listener that checks for matches on each keystroke.

If there are no matches, display an option that says "Create new region: <what is being typed>".

Selecting the option should fill the text box, and that should be what is saved to the Place when you submit the form.

For example, if there is a Place with a region Region1, when I create a new Place and start typing in the region field, R should cause a drop down where I will see Region1 as an option. It will stay there until I type Region2 in which case, no matches will show and instead the option will say "Create new region: Region2".


Answer questions mirandawang

I think it's possible to write custom, but if it's much easier to use , then I'm not opposed, it seems like a pretty small library.


Related questions

No questions were found.
Github User Rank List