Search code examples
extjssencha-touch-2

Sencha Touch how to set selected item in selectfield


I'm using Sencha Touch 2.3.1. How to set an select item in a selectfield ? It's seem no method to support this. I don't want do the trick set an Placeholder to the selectfield.

I have tried to Google it. But it's seem nobody talk about this.


Solution

  • Obviously it supports.

    The value of the Ext.field.Select itself is the value of the selected item. So, you can either set the initial value or dynamically change it at anytime with the value config, via setValue method.