View Full Version : [FIXED] Store.loadData doesn't update Snapshot when loadData is called second time

19 Aug 2011, 8:03 AM
Sencha Touch version tested:


only default ext-all.css
Platform tested against:

iOS 3.x
iOS 4
Android 2.1
Android 2.2
Windows Desktop Chrome
Windows Desktop Safari

Store doesn't updates the Snapshop property everytime LoadData function is called over it. This will cause problem when apply filter to any existing data, then call loaddata again with different set of values. If we clear the filter after loadData, the store will be replaced with the data that was loaded first time. The reason for this issue seems to be loadData function is not updating snapshot property every time it loads data in to store.
Steps to reproduce the problem:

Create new store
Load some data in to store using loadData(data, false), let's load 10 records
Apply filter, so that it will contain only 5 records.
Now load another set of 15 records in to Store using loadData(data, false) function.
Call clearFilter() function.
Store will contain 10 records that were loaded first time, instead of showing the 15 records
The result that was expected:

Store should still contain the last 15 records that were added to it.
The result that occurs instead:

Store contains the first 10 records that were added.
Debugging already done:

Possible fix:

On loadData function, if append variable is passed as "false", the snapshot variable should be updated with new set of data.

22 Aug 2011, 10:07 AM
thanks for the report, got it filed as TOUCH-428

16 Dec 2011, 11:34 AM
This has been fixed as part of the next Touch 2.0 release