Results 1 to 7 of 7

Thread: Infinite Scrolling Grid: PageDown doesn't go beyond 1000 records

    You found a bug! We've classified it as EXTJS-13549 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    242

    Exclamation Infinite Scrolling Grid: PageDown doesn't go beyond 1000 records

    Sample Example:
    http://docs.sencha.com/extjs/4.2.2/e...te-scroll.html

    Steps:
    Keep scrolling down using Page Down key, scroll won't go beyond 1000 records.

    Pls share the possible workaround. Thanks


    https://fiddle.sencha.com/#fiddle/65g
    Last edited by Gary Schlosberg; 27 May 2014 at 5:48 AM. Reason: add test fiddle

  2. #2
    Sencha Premium User
    Join Date
    Nov 2013
    Posts
    320

    Default

    When I try, scroll does not go beyond 900.

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report! Yes I see it happening at 1000 in 4.2.2, 900 in 5.0.0. I have opened a bug in our bug tracker.

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    242

    Exclamation End also doesn't go beyond 1000

    "End" is also not working properly! First time it reaches to 400 then 800 then stops at 1000.
    Please add it into your bug tracker. Thanks

  5. #5
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    389

    Default

    Here is a fiddle which provides an override to fix this issue :

    https://fiddle.sencha.com/#fiddle/6pe

  6. #6
    Sencha User
    Join Date
    Dec 2011
    Posts
    242

    Thumbs up Override to fix Page Down & End issues.

    Thanks Kechroo
    based on your fix, onKeyEnd issue can also be fixed.

    Calculating totalCount based on buffered grid check.

    Code:
    totalCount = store.buffered ? store.getTotalCount() : store.getCount()
    https://fiddle.sencha.com/#fiddle/6tb

  7. #7
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Tokyo
    Posts
    13

    Default

    Hello,

    Ext JS 4.2.4 was released.
    But this issue haven't be fixed yet.
    Please fix onKeyPageUp and onKeyEnd.

    Example:
    Code:
    Ext.define('MyApp.override.selection.RowModel', {
        override: 'Ext.selection.RowModel',
        compatibility: '4.2.4',
    
        onKeyEnd: function(e) {
            var me = this,
                view = me.views[0];
    
            if (view.bufferedRenderer) {
                // If rendering is buffered, we cannot just increment the row - the row may not be there
                // We have to ask the BufferedRenderer to navigate to the target.
                // And that may involve asynchronous I/O, so must postprocess in a callback.
                view.bufferedRenderer.scrollTo(me.store.getTotalCount() - 1, false, function(newIdx, newRecord) {
                    me.afterKeyNavigate(e, newRecord);
                });
            } else {
                // Walk forwards to the end record
                me.afterKeyNavigate(e, view.walkRecs(e.record, view.dataSource.getTotalCount() - 1 - view.dataSource.indexOf(e.record)));
            }
        },
    
        // Go one page down from the lastFocused record in the grid.
        onKeyPageDown: function(e) {
            var me = this,
                view = me.views[0],
                rowsVisible = me.getRowsVisible(),
                newIdx,
                newRecord;
    
            if (rowsVisible) {
                // If rendering is buffered, we cannot just increment the row - the row may not be there
                // We have to ask the BufferedRenderer to navigate to the target.
                // And that may involve asynchronous I/O, so must postprocess in a callback.
                if (view.bufferedRenderer) {
                    newIdx = Math.min(e.recordIndex + rowsVisible, me.store.getTotalCount() - 1);
                    (me.lastKeyEvent || (me.lastKeyEvent = new Ext.EventObjectImpl())).setEvent(e.browserEvent);
                    view.bufferedRenderer.scrollTo(newIdx, false, me.afterBufferedScrollTo, me);
                } else {
                    newRecord = view.walkRecs(e.record, rowsVisible);
                    me.afterKeyNavigate(e, newRecord);
                }
            }
        }
    });

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
  •