Here is the original article from Kendo UI about binding to arrays of primitive objects: https://docs.telerik.com/kendo-ui/framework/mvvm/bindings/source#source-binding-to-arrays-of-primitive-objects
In my project I need to work with an array of strings as the values of input elements. And I was wondering if anyone knows why it's not possible to use the following template:
<script id="ul-template" type="text/x-kendo-template"> <li> <input type="text" data-bind="value: this" /> <a class="k-button textButton" title="Remove" data-bind="events: { click: removeValue }" href="\\#"><span class="k-icon k-i-close"></span></a> </li></script>Instead of the one, provided in their docs:
<script id="ul-template" type="text/x-kendo-template"> <li data-bind="text: this"></li></script>Whatever I tried it simply doesn't list the elements above with the primitive data like [ "Coffee", "Tea", "Juice" ], but it works if there are objects instead of simple strings like [ {product: "Coffee"}, {product: "Tea"}, {product: "Juice"} ], which is not preferable solution in my case.
For your convenience I created the sample of what I need in DOJO, here is the URL: https://dojo.telerik.com/uWEdIroR/3
What am I doing wrong? Thanks in advance.