File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -115,3 +115,4 @@ Individual nodes within the `nodes` property can have the following structure:
115115| ` children ` | array | An array of child nodes. |
116116| ` className ` | string | A className to add to the node. |
117117| ` icon ` | mixed | A custom icon for the node. |
118+ | ` disabled ` | bool | Disable node. |
Original file line number Diff line number Diff line change @@ -191,12 +191,14 @@ class CheckboxTree extends React.Component {
191191 const checked = this . getCheckState ( node , noCascade ) ;
192192 const children = this . renderChildNodes ( node ) ;
193193
194+ const nodeDisabled = ! ! ( disabled || node . disabled ) ;
195+
194196 return (
195197 < TreeNode
196198 key = { key }
197199 checked = { checked }
198200 className = { node . className }
199- disabled = { disabled }
201+ disabled = { nodeDisabled }
200202 expandDisabled = { expandDisabled }
201203 expanded = { node . expanded }
202204 icon = { node . icon }
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ class TreeNode extends React.Component {
145145 'rct-node' : true ,
146146 'rct-node-parent' : this . hasChildren ( ) ,
147147 'rct-node-leaf' : ! this . hasChildren ( ) ,
148+ 'rct-disabled' : disabled ,
148149 } , className ) ;
149150
150151 return (
You can’t perform that action at this time.
0 commit comments