Hi Maverickjin,
Thanks for contacting Syncfusion support.
We have analyzed your query and given code. Based on this, we suspect that you didn’t add the “expanded” member field for child node’s object of data source. The condition (this.opt.expanded === true) fails always since you didn’t specify expanded variable in your source. So that, child nodes are not loaded at initial rendering. Please refer the below code sample,
[JSP]
//전체 펼치기
//if (this.opt.expanded === true) { // this condition always fails due to variable is not defined
if (this.opt.fields != null) {
if (this.opt.fields.dataSource != null) {
var dataArr = this.opt.fields.dataSource;
$.each(dataArr, function (i, val) {
val.expanded = true
});
}
}
//}
//expanded variable is not defined
$("#subjectAreaTreeList").ifvsfTree({
allowDragAndDrop: true,
allowDropChild: false,
allowDropSibling: true,
allowDragAndDropAcrossControl: true,
fields: {
id: "id"
, text: "text"
, parentId: "parentId"
, dataSource: subjectAreaTreeData
, seq: "seq"
},
setBtn: { add: false, mod: false, del: true },
nodeSelect: subjectNodeSelect,
nodeDropped: subjectNodeDropped
});
|
If you still face the same issue, kindly get back to us with more information or provide sample based on your application along with the replication procedure to reproduce the issue at our end. This would be helpful for us to identify the issue and provide a solution at the earliest.
Regards,
Piramanayagam R