Declined
Last Updated: 11 Mar 2022 10:25 by ADMIN

Using setDataSource method on a working DropDownTree, with same initial settings leads to not working clea button and not expanding a collapsed node. 

Dojo: https://dojo.telerik.com/uLUNudEJ 

Steps (clear button):

1. Open dojo and check that everything works correctly

2. Click reload button (calls setDataSource)

3. Clear all button does not work and cannot deselect the item from the tag's clear button.

 

Steps (expand):

1. Open dojo and open popup to see everything expands as expected

2. Click reload

3. Open popup

4. The last (initially collapsed) node cannot be expanded.

Declined
Last Updated: 30 Mar 2021 14:25 by ADMIN
Created by: Hector
Comments: 1
Category: DropDownTree
Type: Bug Report
0

Hi
I have a problem with the DropDownTree component.
From a remote data source type json I am getting a tree with two levels of data but it only shows the first level.

Code:

$("#dropdowntree").kendoDropDownTree({
	dataSource: {
		transport: {
			read: {
				url: "/api/getData",
				type: "POST",
				dataType: "json",
				contentType: "application/json; charset=utf-8"
			}
		}
	},
	checkboxes: true
});

Response:

[
	{
		text: "Furniture", expanded: true, items: [
			{ text: "Tables & Chairs" },
			{ text: "Sofas" },
			{ text: "Occasional Furniture" }
		]
	},
	{
		text: "Decor", items: [
			{ text: "Bed Linen" },
			{ text: "Curtains & Blinds" },
			{ text: "Carpets" }
		]
	}
]
But if I set the data from a js object it shows the two levels correctly
$("#dropdowntree").kendoDropDownTree({
	dataSource: {
		data: [
			{
				text: "Furniture", expanded: true, items: [
					{ text: "Tables & Chairs" },
					{ text: "Sofas" },
					{ text: "Occasional Furniture" }
				]
			},
			{
				text: "Decor", items: [
					{ text: "Bed Linen" },
					{ text: "Curtains & Blinds" },
					{ text: "Carpets" }
				]
			}
		]
	},
	checkboxes: true
});
Previously it worked, I don't know which version of kendo stopped working.
How can I solve it with a single request to the server?