# Useful hooks

### Multiple selection

**Impossible** to please everyone... pass a parameter to call someone and select these nodes at the same time. The tree doesn't has such parameter.

```javascript
this.api.findAll(/Class (A|B)/).select(true)

// to select multiple nodes (new set)
this.api.unselectAll()
this.api.findAll(/Class (A|B)/).select(true)

// one more way (be careful with this example :) )
while(this.api.select({text: /^Class/, selected: false}, true))) { }
```

