Results 1 to 2 of 2

Thread: Scroll problem in list with grouping after data change

  1. #1
    Touch Premium Member
    Join Date
    Oct 2011
    Vote Rating

    Default Unanswered: Scroll problem in list with grouping after data change

    There seems to be an issue with the scrolling in a list with active grouping after data from the data store is changed.

    The first time the list is rendered everything works fine, but after I change the data in the list's store , the scrolling does not work no more and has a strange behavior. The scroll bar seems to scroll but the content is not moving.

    In sencha touch script file this uncaught error pops up:
    class: Ext.dataview.List
    function: translateHeaderTransform: function (offset)
    error: Uncaught TypeError: Cannot read property 'style' of undefined

    Here is a simple code example that reproduces the bug:

    <!DOCTYPE html>
    <html xmlns="">
        <script type="text/javascript" src="sencha-touch-all-debug-w-comments.js"></script>
        <link href="resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript">
                name: 'app',
                launch: function () {
                    var self = this;
                    //create viewport
                    this.viewport = Ext.create('Ext.Panel', {
                        fullscreen: true,
                        layout: { type: 'card' }
                    //define data model
                    Ext.define("demoModel", { extend: "", fields: ["value"] });
                    //define store
           = Ext.create('', {
                        model: 'demoModel'
                    //create sample data
                    var data = [];
                    for (var i = 100; i < 200; i++) {
                        data.push({ value: i });
                    //load data into store
          , false);
                    //Setup grouping
           = function (record) {
                        return, 2)
                    //create list
                    this.list = Ext.create('Ext.List', {
                        scrollable: 'vertical',
                        grouped: true,
                        itemTpl: '<div>{value}</div>'
                    //create top toolbar
                    this.topToolbar = Ext.create('Ext.Toolbar', {
                        docked: 'top',
                        items: [
                            xtype: 'button',
                            text: 'change data',
                            handler: function () {
                                //create sample data
                                var data = [];
                                for (var i = 200; i < 300; i++) {
                                    data.push({ value: i });
                                //load data into store
                      , false);
    The problem reproduces on Google Chrome, Android tablet and IPhone.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Just tested on Chrome using our latest code that will be apart of PR3 when it makes it out and the scrolling is working after I press the change data button.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

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

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts