PDA

View Full Version : Data were created twice when click the editgrid sync



xgocn
11 Dec 2013, 4:49 PM
http://docs.sencha.com/extjs/4.2 ... /writer/writer.html (http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/writer/writer.html)

write.js?
modify the code

onAddClick: function(){
var rec = new Writer.Person({
first: '',
last: '',
email: ''
}), edit = this.editing;

to?

onAddClick: function(){
getRandomInt = Ext.Number.randomInt;
var rec = new Writer.Person({
first: 'Test'+getRandomInt(0,100),
last: 'aaa',
email: 'aaa@qq.com'
}), edit = this.editing;


click the sync button a few times quickly, then reset the data,repeated data appears.

Kevin Jackson
17 Dec 2013, 1:24 PM
Are you reporting an issue with our doc or is this failing in your project? I haven't been able to replicate it.

xgocn
17 Dec 2013, 4:52 PM
I am glad to receive your response,I'll upload the code.