开发者

Select an Ext.Picker field by default

开发者 https://www.devze.com 2023-04-01 12:58 出处:网络
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

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消