View Full Version : [FIXED-511] store.add() : should be able to add array of data instance

4 Nov 2010, 1:11 PM
Hi all
I don't know if this is a bug or if it is really the intended behavior, but it seems much more natural to allow adding data instance to a store this way (argument is an array):

myStore.add([{label:'label1', value:1}, {label:'label2', value:2}])

instead of the current implementation (e.g. posing some problems when you don't know how many data instance you need to add):

myStore.add({label:'label1', value:1}, {label:'label2', value:2})


4 Nov 2010, 2:33 PM
Thanks for the report. The team is reviewing your suggestion and they will let you know what they decide.

8 Nov 2010, 12:45 PM
Makes sense - I have updated the API to accept either a single argument which is an array, or the existing signature of any number of arguments. This will be present in the next release.