Passing ObservableArray to TabStrip.append

3 posts, 0 answers
  1. Sunny
    Sunny avatar
    8 posts
    Member since:
    Dec 2014

    Posted 24 Dec 2014 Link to this post

    ​When creating tabs within TabStrip, I can pass in an array of objects with Tab information to $el.kendoTapStrip().data('KendoTabStrip').append() function, and it works fine.

    But if the tab information is in a kendo.data.ObservableArray (which all arrays within a kendo.observable object get transformed to), then it fails the "array check" within the _create function of Kendo, and consequently tries to get evaluated as a DOM element.

    In 2014.4.1119 the line currently is "if (plain || $.isArray(tab)) {", maybe could be expanded to include this counterpart to read:  "if (plain || $.isArray(tab) || tab instanceof kendo.data.ObservableArray) {", or something to that nature.

    Thanks!
  2. Sunny
    Sunny avatar
    8 posts
    Member since:
    Dec 2014

    Posted 24 Dec 2014 in reply to Sunny Link to this post

    Also, the next line would be changed from "tab = $.isArray(tab) ? tab : [tab];" to "tab = !plain ? tab : [tab];"
  3. Kendo UI is VS 2017 Ready
  4. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 25 Dec 2014 Link to this post

    Hello Sunny,

    Thank you for reporting this. It has been logged in the Kendo UI Core repository. As a workaround, you can call the ObservableArray toJSON method when passing it to the append method.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top