This is a migrated thread and some comments may be shown as answers.

Combobox infinite looping in 2012.3 1315

3 Answers 127 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 07 Feb 2013, 06:30 PM
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 }


3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 08 Feb 2013, 01:37 PM
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!
0
Joel
Top achievements
Rank 1
answered on 08 Feb 2013, 04:40 PM
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.
0
Georgi Krustev
Telerik team
answered on 12 Feb 2013, 11:20 AM
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!
Tags
ComboBox
Asked by
Joel
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Joel
Top achievements
Rank 1
Share this question
or