HI,
I have a Ext.dataview.List in which i would like to intercept the tap/select/touchstart event, so that i can stop the item from being selected, or more precisely, stop the 'x-item-selected' class from being added to that list item.
I have tried every trick in the book to get this done , ie: 'stopEvent' and return false, with no luck. the css class still gets applied. my test class is below
Code:
Ext.define("Por.view.AccountList", {
xtype: "accountlist",
extend: "Ext.List",
config: {
itemTpl: true,
store: 'Accounts',
itemTplGeneric: Ext.create("Ext.XTemplate", '<div class="flex-horiz">', '<div class="flex1">{title}</div>', '<div class="sc-favicon ', '<tpl if="values.favorite">scheduled</tpl>', '<tpl if="! values.favorite">unscheduled</tpl>', '"> </div>', "</div>"),
itemTplNew : Ext.create("Ext.XTemplate", '<div class="flex-horiz">','<div class="checkitem"> </div>','<div class="flex1">','<div class="list-font-header font-bold">{name}</div>','<div class="list-font-normal">', '<span class="font-bold"> Type: </span>','{type}</div><div class="list-font-normal">', '<span class="font-bold"> Account:</span> {referenceableFor}</div><div></div>')
},
applyItemTpl: function () {
return this.inCart ? this.getItemTplGeneric() : this.getItemTplNew() ;
},
listeners : {
select : function(evt){
evt.stopEvent();
return false;
}
}
,
onItemTouchStart: function (evt) {
evt.stopEvent();
return false;
},
onItemTap: function (evt, el, index) {
evt.stopEvent();
return false;
}
});
Is this even possible or do i need to override this behavior by deleting the default css class, and creating a custom css class that I will control via javascript.
Thanks so much for any guidance.