默认情况下如何选择列表中的第一项,而不点击它?以下是我的看法。
Ext.define('MyApp.view.TestList', {
extend: 'Ext.List',
xtype: 'testlist',
config: {
flex: 1,
enableSelection: true,
itemTpl: '{item}',
data: [
{item: 'item-1'},
{item: 'item-2'},
{item: 'item-3'},
{item: 'item-4'}
]
}
});