Results 1 to 2 of 2

Thread: [4.2.0.265] "selectionchange" is not fired

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-8602 in 4.2.0.489.
  1. #1
    Sencha - Community Support Team SamuraiJack1's Avatar
    Join Date
    May 2008
    Posts
    571
    Vote Rating
    6
      0  

    Default [4.2.0.265] "selectionchange" is not fired

    The "selectionchange" event is not longer fired when selected records are removed from the store. It happens because the "removed" variable is not initialized with 0 but later is incremented with ++. It becomes NaN and "maybeFireSelectionChange" is never called.

    Code from Ext.selection.Model:

    Code:
     
        // @private
        // Called by subclasses to deselect records upon detection of deletion from the store
        deselectDeletedRecords: function(records) {
            var me = this,
                selected = me.selected,
                i, length = records.length,
                record, removed;
    
            // Deselect records which were removed
            for (i = 0; i < length; i++) {
                record = records[i];
                if (selected.remove(record)) {
                    if (me.lastSelected == record) {
                        me.lastSelected = null;
                    }
                    if (me.getLastFocused() == record) {
                        me.setLastFocused(null);
                    }
                    ++removed;
                }
            }
            if (removed) {
                me.maybeFireSelectionChange(true);
            }
        },

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Thanks for the report.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

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