Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default Outdated selection after grid store reload.

    Outdated selection after grid store reload.


    If your grid keeps selection after reload then list of records obtained by grid.getSelectionModel().getSelection() contains the same records before and after reload, so if some selected records have been changed you'll never find it until deselect and then selecte records again.

    ExtJS 4.2
    Checked on Chrome, FF

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,017
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    There's not really enough info here, please see: http://www.sencha.com/forum/showthre...o-report-a-bug
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3

    Default


    Here is the problem place in the code (src/selection/Model.js, method refresh):

    Code:
             // Add currently records to the toBeSelected list if present in the Store
            // If they are not present, and pruneRemoved is false, we must still retain the record
            for (; i < len; i++) {
                selection = oldSelections[i];
                if (store.indexOf(selection) !== -1) {
                    toBeSelected.push(selection);
                }
    When you append record to list toBeSelected, this record (variable selection) is not a new record but an old one, you should instead use something like this to fetch updated record from the store:

    Code:
            // Add currently records to the toBeSelected list if present in the Store
            // If they are not present, and pruneRemoved is false, we must still retain the record
            for (; i < len; i++) {
                selection = oldSelections[i];
                if (store.indexOf(selection) !== -1) {
                    toBeSelected.push(store.getAt(store.indexOf(selection)));
                }

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Posts
    7
    Vote Rating
    0
    vog is on a distinguished road

      0  

    Default Please take this bug seriously

    Please take this bug seriously


    I can confirm that this bug exists, because I just spent a lot of time debugging an application in which some updates after store reload didn't propagate properly through the application.

    Given that this bug has been described 9 months ago, and given that sergei.stolyarov even provided a working solution 9 months ago, is there any good reason why this bugfix didn't go into into ExtJS yet?

    What action is needed to increase the priority of this bug?

Thread Participants: 2

Tags for this Thread