Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sub-node check is not working on initializing first time tree #215

Open
RG2712 opened this issue Mar 29, 2018 · 1 comment
Open

Comments

@RG2712
Copy link

RG2712 commented Mar 29, 2018

I have issue while initializing the tree data. On initializing, parent sub-nodes check is not working.
parentDom.parent().find(".class-level").length always gives me length 0 even if it is a parent node

this is the code I wrote on initialize:
settings.onInitialized(function (_data) {
settings.selectData = _data.TaskTypes;
var data = _data.ProjectTasks;
for (var i = 0; i < data.length; i++) {
var row = {
id: data[i].Id,
level: data[i].Level,
pid: data[i].PId,
name: data[i].Name,
taskType: data[i].TaskType,
startDate: data[i].StartDate,
endDate: data[i].EndDate
};
var treenode=generateTreeNode(dom_table, row, row.level);
treeData[row.id] = row;
var expendIcon = dom_table.find("li.j-expend");
if (expendIcon.parent().attr("data-loaded")) {
//toggleicon($(expendIcon));
//toggleExpendStatus(expendIcon, treenode);
}
}
settings.bindDropDown();
});

Please suggest

@RG2712
Copy link
Author

RG2712 commented Apr 3, 2018

Please suggest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant