1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    2
    Answers
    1
    Vote Rating
    0
    loneranger is on a distinguished road

      0  

    Default Answered: Ext.List.Refresh() Keeping scroll position

    Answered: Ext.List.Refresh() Keeping scroll position


    Hello,

    I am new to Sencha Touch and I am modifying the Store dynamically in JavaScript (no Proxy or anything like that). But when I call Refresh() on the list, it does work, but it scrolls all the way to the top.

    Is there a way I can avoid this?

    Thank you very much in advance : )

  2. I found the answer to my own question:

    Set scrollToTopOnRefresh to false.

    Ext.define('MyProject.view.MyList', {
    extend: 'Ext.List',


    config: {
    itemTpl: '{firstName} {lastName}',
    scrollToTopOnRefresh: false,
    store: 'Person'
    }
    });

    Sorry, I think this was posted before... but it may still help someone.

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Posts
    2
    Answers
    1
    Vote Rating
    0
    loneranger is on a distinguished road

      0  

    Default scrollToTopOnRefresh: false

    scrollToTopOnRefresh: false


    I found the answer to my own question:

    Set scrollToTopOnRefresh to false.

    Ext.define('MyProject.view.MyList', {
    extend: 'Ext.List',


    config: {
    itemTpl: '{firstName} {lastName}',
    scrollToTopOnRefresh: false,
    store: 'Person'
    }
    });

    Sorry, I think this was posted before... but it may still help someone.