Results 1 to 4 of 4

Thread: [4.2.0 GA] Changing id in filtered store skips snapshot

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9523 in a recent build.
  1. #1
    Ext JS Premium Member cabal's Avatar
    Join Date
    Mar 2009
    Location
    Warsaw, Poland
    Posts
    23
    Vote Rating
    1
      0  

    Default [4.2.0 GA] Changing id in filtered store skips snapshot

    REQUIRED INFORMATION
    Ext version tested:
    • Ext 4.2.0 GA

    Browser versions tested against:
    • FF20

    DOCTYPE tested against:
    • HTML 4.01 Transitional

    Description:
    • When creating and synchronizing new record in filtered store, id is commited only to data, snapshot is skipped. On next store filter it creates error - record cannot be found by id, because map in snapshot contains tamporary record id

    Steps to reproduce the problem:
    • Filter store
    • Add new record
    • Sync
    • Filter again
    • Try to get record by id (as for example data view do to add mouseOverCls)

    HELPFUL INFORMATION
    Possible fix:
    Code:
    Ext.define('Fixed.Store', {
        override: 'Ext.data.Store',
    
        onIdChanged: function(rec, oldId, newId, oldInternalId) {
            if (this.snapshot) {
                this.snapshot.updateKey(oldInternalId, newId);
            }
    
            this.callParent(arguments);
        }
    });

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Vote Rating
    247
      0  

    Default

    I'm having trouble reproducing the issue. I tried modifying the CRUD writer example in the SDK to add/filter/filter again running on FF and Chrome and did not see the same error you're describing.

    Perhaps I'm missing something when attempting to reproduce the issue?

  3. #3
    Ext JS Premium Member cabal's Avatar
    Join Date
    Mar 2009
    Location
    Warsaw, Poland
    Posts
    23
    Vote Rating
    1
      0  

    Default

    It is not add/filter/filter.
    It's filter/add/filter cycle.

    During add, the temporary id is changed in map (MixedCollection, store.data), but not in snapshot created during first filter. On second filter, snapshot is restored and it's map is invalid.

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Vote Rating
    247
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Posting Permissions

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