Sencha List Disclosure with a Different Event than Itemtap

Sencha 1.0(ish) doesn’t have an option for tying a different event for the onItemDisclosure tap than the itemtap event. Here’s a convenient workaround. Set the onItemDisclosure to true to force it to show up, but give all the work to the itemtap event.

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!");


©2005-2018 Blog – Epiphany Digital is proudly powered by Badgers and Web Design is by Epiphany Digital
Entries (RSS) and Comments (RSS). 27 queries. 1.889 seconds.

Thank you for visiting this site. The web fairy will visit you in your sleep... you know, I was going somewhere with this, but it really doesn't have as much innocent charm as the tooth fairy, especially when I picture the web fairy as someone much like the Simpsons' Comic Book Guy but with wings. It's just not something I want.