bootstrapTable-treeView icon indicating copy to clipboard operation
bootstrapTable-treeView copied to clipboard

getSelections取不到选中的child

Open lisongl123 opened this issue 6 years ago • 1 comments

$("#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; } }); });

lisongl123 avatar May 31 '18 00:05 lisongl123

谢谢

lslvxy avatar May 31 '18 02:05 lslvxy