July 2015
Beginner
452 pages
8h 34m
English
The tree panel also has the ability to add checkboxes to its nodes. To do this, we need to add one more property to each node in the data source that we are applying to the tree panel.
Let's use the first example of this chapter, and we will change the root property (data) as follows:
root: {
text: 'My Application',
expanded: true,
checked:false,
children: [{
text: 'app',
checked:false,
children:[
{ leaf:true, text: 'Application.js', checked:false }
]
},{
text: 'controller', expanded: true, children: [],
checked:false
},{
text: 'model', expanded:true, checked:false,
children: [
{leaf:true, text: 'clients.js', checked:false},
{leaf:true, text: 'providers.js', checked:false},
{leaf:true, text: 'users.js', checked:false} ] },{ text: ...Read now
Unlock full access