I am trying to handle events in one list, the first is the itemtap event, and the other is the onItemDisclosure event.
When I click on the arrow, the onItemDisclosure event is fired and the handler is executed, however the itemtap is also fired, and after the onItemDisclosure handler is executed, the itemtap handler is executed.
How can i solve this?
View:
Ext.define('myapp.view.listview', {
requires: [ 'myapp.model.listmodel'],
extend: 'Ext.List',
alias:'widget.listview',
id : 'listview',
fullscreen: true,
config: {
iconCls: 'list',
title : 'List',
onItemDisclosure: function () {
alert('ok')
},
store:'ListView',
itemTpl:'{title}'
}
});
Controller Code:
Ext.define('myapp.controller.Main', {
extend: 'Ext.app.Controller',
views : ['listview'],
config : {
refs:{
list:'#listview'
},
control :{
listview:{
itemtap:'display',
onItemDisclosure : 'disclosure'
}
}
},
display:function(){
alert('tap')
},
disclosure:function (){
alert('disclosure');
},
source
share