Results 1 to 3 of 3

Thread: Ext.plugin.PullRefresh - not displaying correctly

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    30
    Vote Rating
    6
      0  

    Default Ext.plugin.PullRefresh - not displaying correctly

    I have created a list class as follows:

    Code:
    Ext.define('myApp.view.myList', {
        extend: 'Ext.dataview.List',
        alias: 'widget.myList',    
        config: {
            layout: {
                type: 'fit'
            },
            store: 'myStore',
            disableSelection: true,
            grouped: true,
            indexBar: true,
            itemTpl: [
                '<div>{name}</div>'
            ],
            plugins: [
                Ext.create('Ext.plugin.PullRefresh', {
                    refreshFn: function(plugin) {
                        console.log('in refresh');
                    }
                })
            ]
        }
    });
    I then reference it via xtype in a navigation view as follows:

    Code:
    Ext.define('myApp.view.myNav', {
        extend: 'Ext.navigation.View',
        alias: 'widget.myNav',
        requires: [
            'myApp.view.myList'
        ],
        config: {
            autoDestroy: false,
            items: [
                {
                    xtype: 'myList',
                    title: 'My List',
                    pinHeaders: true
                }
            ]
        }
    });
    The problem I have is that the pull to refresh plugin is not behaving correctly - which I think is due to the fact it is associated via an xtype link and directly specified in the navigation view. When I pull doen the list there is no text displayed - although the object seems to be functioning as the message appears in the console from the refresh function.

    Regards,

    Darryl

  2. #2
    Sencha User jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    567
    Vote Rating
    21
      0  

    Default

    I tried recreating your setup and it appears that the issue is that you've assigned layout:'fit' to the list. It works fine otherwise -- apparently assigning that prevents the plugin from rendering.

    Try removing the layout and let us know if that does not fix the issue for you.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #3
    Sencha User jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    567
    Vote Rating
    21
      0  

    Default

    That said, I did notice a related bug while building out this testcase: the fact that we instantiate the plugin during the list class's config definition causes issues when that class is used as the master for multiple linked instances, because all those instances end up sharing the same plugin instance. We should be generating a plain config object for the plugin, not instantiating it. I've opend internal ticket DSGNR-1709 to get this addressed.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

Posting Permissions

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