1. #1
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    20
    Vote Rating
    0
    erik_luengen is on a distinguished road

      0  

    Default Unanswered: dataview itemSingleTap wrong params

    Unanswered: dataview itemSingleTap wrong params


    Hi guys,

    I'ver a dataview witch is using data item. And I've add a listener for single tap.
    My data view looks like that:

    Code:
          {
                    xtype: 'dataview',
                    itemId: 'RowView',
                    defaultType: 'RowItem',
                    store: 'GridRowStore',
                    useComponents: true
                }
            ],
            listeners: [
                {
                    fn: 'onRowViewItemSingletap',
                    event: 'itemsingletap',
                    delegate: '#RowView'
                }
            ]
        },
    
    
        onRowViewItemSingletap: function(dataview, index, target, record, e, eOpts) {
            console.log(index);
            console.log(record)
        }
    And the console log shows that:

    -1
    undefined
    So why is the index -1 if I klick on the first item?
    It should be 0.
    But not only the first item has that index. Only the last item has the index 0.
    All other items return the index -1.

    Need help in this case thanks in advance.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    What ST 2.x.x version are you using?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    20
    Vote Rating
    0
    erik_luengen is on a distinguished road

      0  

    Default


    I use the newest 2.2.0 version of ST. And 2.2.2 sencha architect.