1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    19
    Vote Rating
    0
    schvenk is on a distinguished road

      0  

    Default Grouped List view jumps to last header when scrolled

    Grouped List view jumps to last header when scrolled


    I love the built-in grouping / indexBar functionality in the List view, but I'm having an issue: when I scroll the list down (so the first header should stick at the top) it's actually the last header that does. That is, if my list is indexing on the first letter of each item, i.e.
    Code:
    ...
    getGroupString: function(rec) {
        return rec.get('name')[0];
    }
    ...
    then instead of the "A" header sticking at the top when I begin to scroll, the "Z" one does. Everything else works fine (the grouping itself, the index bar, etc.)

    Any idea what might be happening?

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    19
    Vote Rating
    0
    schvenk is on a distinguished road

      0  

    Default


    Hmm...no thoughts on this? Still seeing this problem. And, a further one that may be related: in these same grouped lists, the index bar doesn't work until the list is scrolled. That is, nothing happens when you interact with the index bar at first. If you scroll the list itself even a little bit and then go back to the index bar it works fine.

  3. #3
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    0
    markguinn is on a distinguished road

      0  

    Default


    No clue on your original question, but the answer to your second issue can be found here: http://www.sencha.com/forum/showthre...crolling-issue

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    Switzerland
    Posts
    16
    Vote Rating
    0
    chrigu is on a distinguished road

      0  

    Default


    I have exactly the same problem and it seems like still not fixed (the problem that the group label is showing the last letter)

  5. #5
    Sencha User MrSlayer's Avatar
    Join Date
    Sep 2011
    Location
    The Poopy Glove
    Posts
    3
    Vote Rating
    0
    MrSlayer is on a distinguished road

      0  

    Default


    I encountered the same problems as described in this post. The grouping header was jumping to Y (my last group) whenever I scrolled and the indexBar was not working until I scrolled at least a pixel.

    I tried a variation of the solution provided here, and while it didn't fix the indexBar (like it should have), it did resolve the grouping headers. Here is the code to my view, before and after the modification:

    Before
    Code:
    App.views.ArtistListPanel = Ext.extend( Ext.Panel,
    {
        initComponent :
            function ( )
            {
                this.store = new Ext.data.Store(
                {
                    autoLoad : true,
                    getGroupString :
                        function ( record )
                        {
                            return record.get( 'name' )[0];
                        },
                    model : 'Artist',
                    sorters : ['name']
                } );
                
                this.dockedItems = [
                {
                    xtype : 'toolbar',
                    dock : 'top',
                    items :
                        [
                            { xtype : 'spacer' },
                            { xtype : 'spacer' }
                        ],
                    title : 'Artists'
                } ];
                
                this.list = new Ext.List(
                {
                    itemTpl : '<strong>{name}</strong>',
                    grouped : true,
                    indexBar : true,
                    store : this.store
                } );
                
                this.items = [this.list];
                
                App.views.ArtistListPanel.superclass.initComponent.apply( this, arguments );
            },
        layout : 'fit'
    } );
    
    Ext.reg( 'artist-listpanel', App.views.ArtistListPanel );
    After
    Code:
    App.views.ArtistListPanel = Ext.extend( Ext.Panel,
    {
        initComponent :
            function ( )
            {
                this.store = new Ext.data.Store(
                {
                    autoLoad : true,
                    getGroupString :
                        function ( record )
                        {
                            return record.get( 'name' )[0];
                        },
                    model : 'Artist',
                    sorters : ['name']
                } );
                
                this.dockedItems = [
                {
                    xtype : 'toolbar',
                    dock : 'top',
                    items :
                        [
                            { xtype : 'spacer' },
                            { xtype : 'spacer' }
                        ],
                    title : 'Artists'
                } ];
                
                this.list = new Ext.List(
                {
                    itemTpl : '<strong>{name}</strong>',
                    grouped : true,
                    indexBar : true,
                    store : this.store
                } );
                
                if ( this.list.scroller )
                {
                    if ( this.list.scroller.offsetBoundary.top == 0 ) 
                    {
                        this.list.scroller.updateBoundary( );
                    }
                }
                
                this.items = [this.list];
                
                App.views.ArtistListPanel.superclass.initComponent.apply( this, arguments );
            },
        layout : 'fit'
    } );
    
    Ext.reg( 'artist-listpanel', App.views.ArtistListPanel );
    Perhaps this can help with your issue.
    10 01 10

  6. #6
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Urgh, never seen this issue before... it's scant consolation but the new one in 2.x is looking pretty hot and is receiving a lot more attention than the old 1.x implementation. We'll be releasing the first beta very soon so I hope you can hold on another week or two
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  7. #7
    Sencha User
    Join Date
    Nov 2010
    Posts
    5
    Vote Rating
    0
    topquark is on a distinguished road

      0  

    Default Thank you MrSlayer

    Thank you MrSlayer


    Quote Originally Posted by MrSlayer View Post
    Code:
                if ( this.list.scroller )
                {
                    if ( this.list.scroller.offsetBoundary.top == 0 ) 
                    {
                        this.list.scroller.updateBoundary( );
                    }
                }
    Thank you so much. I was having the last header problem and adding your code for this.list.scroller to the initComponenet of the view did the exact trick.

    Cheers
    Tq

  8. #8
    Sencha User
    Join Date
    Nov 2010
    Posts
    5
    Vote Rating
    0
    topquark is on a distinguished road

      0  

    Default


    Dang. Spoke too soon. It worked when the list originally appears, but when I click to another panel on the TabPanel, and then back, the original buggy behaviour reappears.

    It seems to be related to when I have more than one grouped list in my app. Strange. Maybe fixed in Version 2 (can't wait to try integrating).

  9. #9
    Sencha User
    Join Date
    Dec 2011
    Location
    PUNE,INDIA
    Posts
    28
    Vote Rating
    0
    priya gupta is on a distinguished road

      0  

    Question Problem with the index bar.....in list

    Problem with the index bar.....in list


    I have created the group list with index bar. But the list is not behaving in the requiered fashion.
    List displays with index bar for the first time but when I reload the window then I am able to see the index bar in my list..

    I dont know what is the issue I have created the list again and again from the examples and demos but there is no change.

    Please help me what should I do for index bar to be displayed for the first time

  10. #10
    Sencha User
    Join Date
    Oct 2011
    Posts
    2
    Vote Rating
    0
    tyagi.anuj is on a distinguished road

      0  

    Default


    Thanks a lot MrSlayer... Your solution worked perfectly!!!

Similar Threads

  1. [CLOSED-591] scrolled text jumps back
    By eric2008 in forum Sencha Touch 1.x: Bugs
    Replies: 3
    Last Post: 29 May 2012, 1:13 PM
  2. [CLOSED-179] Grouped list throws error when scrolled up.
    By elishnevsky in forum Sencha Touch 1.x: Bugs
    Replies: 4
    Last Post: 29 Jul 2010, 9:35 AM
  3. Replies: 1
    Last Post: 7 Jul 2010, 12:50 AM
  4. List view which behaves like windows explorer list view
    By suvarnal in forum Ext GWT: Help & Discussion (1.x)
    Replies: 4
    Last Post: 9 Dec 2008, 5:39 AM
  5. TreePanel problem - odd behaviour when view is scrolled down
    By fusioned in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 20 May 2007, 2:30 PM

Thread Participants: 7

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi