javascriptsproutcoresproutcore-views

Implement Dropdown List using Sproutcore 1.6


As the title, I want to implement a dropdown list using Sproutcore 1.6.

I searched some relevant view in the document, there are: SelectView, SelectFieldView.

  1. Anybody who has done that before, which is the best option for that?

  2. Also, I want to put the dropdown list in a parent view, which is the best view for this parent view? Is that just SC.View?

Thanks everyone.


Solution

  • In the documentation for SC.SelectFieldView, it says

    DEPRECATED. Use SelectView instead.

    So that pretty much answers it.

    You can put the select field in any view you want.

    Be warned though, performance can get bad if you have more than 2-3 dozen options.

    In that case, I would use native select tags and handle all the events and options myself.