disabledField : stringDefault: 'disabled'

Disabled field name. Assume that the item is not disabled if not set.

Examples

Default Value

    
 <div id="tree"></div>
 <script>
     var tree = $('#tree').tree({
         checkboxes: true,
         dataSource: [ { text: 'foo', children: [
                 { text: 'bar', disabled: true, children: [ { text: 'sub-bar' } ] },
                 { text: 'bar2', disabled: false }
             ] }
         ]
     });
 </script>

  

Custom Value

    
 <div id="tree"></div>
 <script>
     var tree = $('#tree').tree({
         checkboxes: true,
         disabledField: 'disabledState',
         dataSource: [ { text: 'foo', children: [
                 { text: 'bar', disabledState: true, children: [ { text: 'sub-bar' } ] },
                 { text: 'bar2', disabledState: false }
             ] }
         ]
     });
 </script>

  

Bootstrap

    
 <div id="tree"></div>
 <script>
     var tree = $('#tree').tree({
         uiLibrary: 'bootstrap',
         checkboxes: true,
         dataSource: [ { text: 'foo', children: [
                 { text: 'bar', disabled: true, children: [ { text: 'sub-bar' } ] },
                 { text: 'bar2', disabled: false }
             ] }
         ]
     });
 </script>

  

Bootstrap 4

    
 <div id="tree"></div>
 <script>
     var tree = $('#tree').tree({
         uiLibrary: 'bootstrap4',
         checkboxes: true,
         dataSource: [ { text: 'foo', children: [
                 { text: 'bar', disabled: true, children: [ { text: 'sub-bar' } ] },
                 { text: 'bar2', disabled: false }
             ] }
         ]
     });
 </script>