I've created a 开发者_StackOverflow中文版Picker in a form in my sencha app. The field is empty by default. How do I set it to be selected on the first item in the data array?
It automatically selects the first item in data array (node 0) ... if the first item is empty and you want it to be on the 2nd item you can (assuming a the component variable is called picker
) use picker.items.items[0].setSelectedNode(1)
精彩评论