In createView, I add a property, multiple: true. When I select multiple items, I get an error, "product.get is not a function" in the console. I ran iteration in listentoonce, this.selectProduct(model[i]);, but then I get error of "cannot set property 'checked' of undefined.
add multiple items to quoteitem
Collapse
X
-
add multiple items to quoteitem
Tags: None -
How can I add multiple items from the view rendered? I either get an error, "product.get is not a function", or if I run a loop with the model in the name directory, only the last item on the view rendered is set on the itemlist. -
When multiple is set true, then it becomes an array. I ran an iteration:
PHP Code:this.createView('dialog','Modals.SelectRecords',{
scope:'Task',
createButton:false,
primaryFilterName:'completed',
multiple:true
},function(view){
view.render();
this.notify(false);
this.listenToOnce(view,'select',function(model){
model.forEach(function(m){
this.selectProduct(m);
},this);
},this);
}.bind(this));
Comment
Comment