I have a List like this:
Ext.define('ddp.components.listview.ListView', {
extend: 'Ext.dataview.List',
listeners: {
childtap: function(view, location, eOpts) {
// TODO
}
},
itemTpl: new Ext.Xtemplate(`
<div>{item}</div>
`),
});
Now I want that if I select an item by clicking it (the div that is rendered by Ext.dataview.List in itemTpl), a selected icon show up at the beginning of the selected item. However I cannot seem to find a way to access the item to do so. Any idea?
x-selected
class to the listitem in the DOM. Can't you use this in CSS to add your icon? You probably want to set the itemCls as well, so that it only renders for a combination of itemCls and x-selected – Matt Allwood