PDA

View Full Version : [NOREPRO] Model's convert function gets the previous value with PullRefresh plugin



rbahumi
27 Nov 2012, 4:31 AM
REQUIRED INFORMATION


Ext version tested:

sencha-touch-2.0.1.1



Browser versions tested against:

Chrome



DOCTYPE tested against:

!DOCTYPE HTML



Description:
Model's convert function gets the previous value insted of a new value, when using the PullRefresh plugin.
For example, if I have a model field with name 'username' and value 'Bob', and I define a convert function for the field that will concatenate ' Sacramento' to the username:


fields:[
{ name: 'username', type: 'string', convert: function(v){console.log('username: ' + v); return v+' Sacramento'; } },
]



The result that was expected:
The console.log() output for refreshing the view 3 time (with PullRefresh plugin) will be:

username: Bob Sacramento
username: Bob Sacramento
username: Bob Sacramento



The result that occurs instead:
The output for refreshing the view 3 time will be:

username: Bob Sacramento
username: Bob Sacramento Sacramento
username: Bob Sacramento Sacramento Sacramento



HELPFUL INFORMATION
The issue does not happen when calling store.load() explicitly (without the PullRefresh plugin).


Operating System:

Win 7 Pro

mitchellsimoens
27 Nov 2012, 6:13 AM
Thanks for the report! I have opened a bug in our bug tracker.

rbahumi
31 May 2013, 11:12 AM
Just a small reminder about this one - I still see it in Touch 2.2.