tree.treeControl.expandAll() has an error
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
#### Bug
Dear team!
I has an error when I want to expand all node of Mat nested tree
```
ERROR TypeError: Cannot read property 'reduce' of undefined
at NestedTreeControl.push../node_modules/@angular/cdk/esm5/tree.es5.js.NestedTreeControl.expandAll (tree.es5.js:287)
at Object.eval [as handleEvent] (FilterViewComponent.html:18)
at handleEvent (core.js:10050)
at callWithDebugContext (core.js:11143)
at Object.debugHandleEvent [as handleEvent] (core.js:10846)
at dispatchEvent (core.js:7509)
at core.js:7953
at HTMLButtonElement. (platform-browser.js:1140)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:3748)
```
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.1.0
Material 6.4.1
Contributor guide
Research direction
Start by reproducing the failure in NestedTreeControl.expandAll with Angular 6.1.0 and Material 6.4.1, using the call shown in FilterViewComponent.html. Inspect the nested-tree implementation around the reported tree.es5.js location and determine why reduce receives undefined; done means expandAll expands all nested nodes without the error and has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100