The described behavior is expected, because you are trying to the set the value of an HTML input element to an Array instance. The MVVM value binding will get the model property value and will set the value of the input element like this:
//input is a reference to the input element
input.value = model.selectedItems;
//this is equivalent to this:
).value = [
//result will be [object Object]
Please note that the valuePrimitive
specifies whether the MVVM value binding should set the model property to an Array of primitive values or to an Array of data objects, but in both cases the value will be Array.
Could you elaborate what do you want to see in the input element - the values of the array or serialized list of selected objects? Here is a simple demo
that shows how to use MVVM source and templating to map selected items to a table.
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI