Combobox infinite looping in 2012.3 1315

4 posts, 0 answers
  1. Joel
    Joel avatar
    5 posts
    Member since:
    Nov 2012

    Posted 07 Feb 2013 Link to this post

    Chrome 24.0.1312.57m
    KendoUI 2012.3 1315
    Using jQuery from KendoUI.

    Note: I did not have this issue with previous versions of KendoUI from August/September.

    I'm running into a situation where a serverPageable DataSource returns an empty result and still does infinite loops.


    From the changelog:
    • Fixed: Combobox falls into infinite loop if DataSource returns an empty result

    JSON Data returned by server:
    { data: [], totalCount: 0 }
    DataSource definition:
    myDS = new kendo.data.DataSource({
            type: "json",
            pageSize: 15,
            serverPaging: true,
            serverFiltering: true,
            transport: {
                read: {
                    type: "GET",
                    dataType: "json",
                    data: {
                        func: "myfunc"
                    },
                    url: "../myrest/"
                }
            },
            schema: {
                model: {
                    id: "MY_ID",
                    fields: {
                        MY_ID: { type: "string" },
                        SHORT_DESCRIPTION: { type: "string" }
                    }
                },
                data: function(response) {
                    return response.data;
                },
                total: function(response) {
                    return response.totalCount;
                }
            }
        });
    The issue is fixed if I pass a blank object into the data array to get this:
    { data: [{}], totalCount: 0 }


  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 08 Feb 2013 Link to this post

    Hello Joel,

     
    I prepared a simple jsFiddle demo, but was not able to replicate the issue with the latest official release of Kendo UI. Could you please check it and let me know if I am missing something?

    Regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Joel
    Joel avatar
    5 posts
    Member since:
    Nov 2012

    Posted 08 Feb 2013 Link to this post

    Hi George, thanks for preparing that! I'll have to try out jsFiddle next time before making a post like this.

    When I change your jsFiddle to have dataSource.transport.read.type = "GET" the combobox now shows as infinitely rotating. When it's POST as in your example, the spinning wheel isn't there any more.

    I'll try to make a jsFiddle to reproduce the issue.
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 12 Feb 2013 Link to this post

    Hello Joel,

     
    I will suggest you bind the error event and verify whether there is any error. 

    Kind regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready