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

getSelections取不到选中的child #19

Open
lisongl123 opened this issue May 31, 2018 · 1 comment
Open

getSelections取不到选中的child #19

lisongl123 opened this issue May 31, 2018 · 1 comment

Comments

@lisongl123
Copy link

$("#tableId").bootstrapTable("getSelections");
取不到选中的child,调试发现,在js的on click监听事件中,勾选父节点,循环给子节点添加选中状态时,没有将子节点的0属性,设置为true。设置上后就可以取到数据了。
位于557行左右
$.each(child, function (i, c) {
$.each(that.data, function (index, item) {
if (item[that.options.treeId] == c[that.options.treeId]) {
------- -------> item[that.header.stateField] = checked ? true : false;
item.checked = checked ? true : false;
that.trigger(checked ? 'check' : 'uncheck', item, this);
return;
}
});
});

@lslvxy
Copy link
Owner

lslvxy commented May 31, 2018

谢谢

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

2 participants