PDA

View Full Version : Bug when dynamic adding elements to container with Ext.create



pidugusundeep
20 Jun 2018, 4:21 AM
for(i=0;i<question.length;i++){
questionWidget = Ext.create( {
xtype:'questionwidget',
question:question[i1].question,
doMask:true,
})
questionsElements.push(questionWidget)
}



questionsElements is a container and when i use i it is automatically getting 4 for the next iteration and if i use any other variable its working fine. so is the length of questions is 3 then it only iterates only once.