Hi,
Setting different handlers for the "disclosure" and "itemtap" events on a list doesn't work because both are called when the disclosure button is pressed.
Best regards,
Werner Donné.
Printable View
Hi,
Setting different handlers for the "disclosure" and "itemtap" events on a list doesn't work because both are called when the disclosure button is pressed.
Best regards,
Werner Donné.
you are right with 1.0.1a
as a workaround, you can check event target :
if (e.getTarget('.x-list-item-body') ) {
console.log("itemt tap!");
} else {
console.log("disclosure!");
}
Thank you for the workaround.
Werner.
Hello,
this bug is also on 1.1.0.
i add : Your trick did it to me, but sometimes when tap on event, the disclose also triggers. Don't know how to fix it.
Where is "e" defined in this scenario?
On the Sencha touch Doc :
Disclose : ( Ext.data.Record record, Ext.Element node, Number index,Ext.util.Event e )
So, it's the Event in the Disclose's arguments.
What I ended up doing:
Works great. Thanks guys!Code:onItemDisclosure : true,
listeners : {
itemtap : function(record,index,item,e){
if (e.getTarget('.x-list-disclosure')) {
Ext.Msg.alert("Disclosure clicked!");
} else {
Ext.Msg.alert("Item clicked!");
}
}
}
Anyone have any idea how to change the icon????
Simply add a 'cls' attribute on any .x-list-disclosure's parent (on the Ext.List itself for example)
Then change your .css :
.your-list-cls .x-list-disclosure {
-webkit-mask: none;
background-image: url('../img/trashcan.png') !important;
background-size: 100% 100%;
-webkit-background-size: 100% 100%;
background-color: transparent !important;
background-repeat: no-repeat;
background-position: center;
width: 2em;
height: 2em;
}
Thanks!
i want to display details of selected record in next page without a pressing a disclosure button