0
我有樹視圖,dragAndDrop
設置爲true。當樹的葉節點被轉換爲內部節點時,通過放下某個孩子,它開始表現得很奇怪。如果我摺疊此節點,它不會再次展開。如果我放棄另一個孩子,它會變得更加怪異。這裏是我使用的代碼:劍道樹視圖,節點崩潰但不會再次展開
var inline = new kendo.data.HierarchicalDataSource({
data: [
{ categoryName: "Storage", subCategories: [
{ subCategoryName: "Wall Shelving" },
{ subCategoryName: "Floor Shelving" },
{ subCategoryName: "Kids Storage" }
] },
{ categoryName: "Lights", subCategories: [
{ subCategoryName: "Ceiling" },
{ subCategoryName: "Table" },
{ subCategoryName: "Floor" }
] }
],
schema: {
model: {
children: "subCategories"
}
}
});
$("#label-tree").kendoTreeView({
dragAndDrop: true,
loadOnDemand: false,
dataSource: inline,
dataTextField: [ "categoryName", "subCategoryName" ]
});
我試過其他的方式來定義數據源,但它們結束了。我做錯了嗎?