diff --git a/README.md b/README.md index c0a724235..057046009 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,12 @@ Whether or not a node is selected. #### tags `Array of Strings` `Optional` +#### hideCheckbox + +`Boolean` `Default: true` + +Used to hide the checkbox of specific node in the tree. + Used in conjunction with global showTags option to add additional information to the right of each node; using [Bootstrap Badges](http://getbootstrap.com/components/#badges) ### Extendible diff --git a/src/js/bootstrap-treeview.js b/src/js/bootstrap-treeview.js index 7a82a2eeb..f223b2533 100644 --- a/src/js/bootstrap-treeview.js +++ b/src/js/bootstrap-treeview.js @@ -568,11 +568,12 @@ if (_this.options.showCheckbox) { var classList = ['check-icon']; - if (node.state.checked) { - classList.push(_this.options.checkedIcon); - } - else { - classList.push(_this.options.uncheckedIcon); + if(!node.hideCheckbox){ + if (node.state.checked) { + classList.push(_this.options.checkedIcon); + }else { + classList.push(_this.options.uncheckedIcon); + } } treeItem