oakmac / autocompletejs

AutoCompleteJS Widget
Other
72 stars 14 forks source link

Feature Request: Ability to mix a nested list with simple options #58

Open johnbland-wf opened 11 years ago

johnbland-wf commented 11 years ago

Re: http://autocompletejs.com/examples#1003.

In the following setup, I'd like to mix the ability to choose sub-options with being able to select just the top level option. In this example, you can see there is a select with a sub-option selected then Meats doesn't: http://screencast.com/t/Hmc8geEjJdJ.

I'm looking for the option to have the following: Fruits:Apple Meats Meats:Hamburger

Of course, for food, that doesn't make sense but that's the idea. :)

(great preso tonight, BTW)

oakmac commented 11 years ago

Giving this another look; I think you can accomplish this by just putting all of your sub-options under the initial list.

Options that have children (ie: that go to a sub-list) can exist alongside options that have no children. See this example.

On a side note, I need to come up with a better example to demonstrate this capability.