-
6 Nov 2007 1:51 AM #1
[2.0b1][CLOSED] Ext.data.Store.insert misses to update snapshot
[2.0b1][CLOSED] Ext.data.Store.insert misses to update snapshot
Does not update this.snapshot, and thus the new records are "not there". After joining the record, there should be aCode:/** * Inserts Records to the Store at the given index and fires the add event. * @param {Number} index The start index at which to insert the passed Records. * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects to add to the cache. */ insert : function(index, records){ records = [].concat(records); for(var i = 0, len = records.length; i < len; i++){ this.data.insert(index, records[i]); records[i].join(this); } this.fireEvent("add", this, records, index); },
Code:if(this.snapshot){ this.snapshot.insert(index, records[i]); }
-
6 Nov 2007 9:47 AM #2
This is not a bug. You need to clear the filter before adding new data.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
6 Nov 2007 12:44 PM #3
What do you mean? In my store I have set no filtering... It's a store used by ComboBox. And I want to add a record at position 0.
-
6 Nov 2007 1:10 PM #4
If you're not filtering, then there would be no snapshot.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
7 Nov 2007 5:43 AM #5
Thanks, tryanDLS! Now I fully got your point!
(making a bow)
-
22 Sep 2009 11:00 PM #6
Last edited by smartree; 22 Sep 2009 at 11:04 PM. Reason: Hope the Team member have a look and think!
-
22 Sep 2009 11:15 PM #7Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41






Reply With Quote