Skip to content Skip to sidebar Skip to footer

How To Add Itemtap

I have a list and I cant get items in the list to be clickable. I have onItemDisclosure and that should work but it is not. I would like the whole row to be clickable but I cant se

Solution 1:

Try something like this:

items : [ {
    xtype :'list',
    itemTpl :'<span id="{letter}">{course}</span>',
    store :Course.stores.Properties,
    listeners: {
        scope :this,
        itemtap :function(foo, bar, etc) {
            doSomething...
        }
  } ],

Solution 2:

The reason that taps are not being handled is because you are overriding the itemSelector config:

itemSelector : 'span.id',

You should not do this, as Ext.List expects it to be a certain internally-set value in order to handle events on items properly. Simply removing this from your config should make it start working.

Post a Comment for "How To Add Itemtap"