0

I make a change in one of the branches in the tree and want to see the change immediately. Just like in the example: Stackblitz

My problem is that if I go exactly according to the example, I try in the constructor to access the function whose access property is private (not like in the example, maybe it's a problem in the Angular version?) and because the function is private the TS yells at me.

"TS2341: Property '_data' is private and only accessible within class 'MatTreeNestedDataSource '."

someone deal with this issue?

Naor Yael
  • 69
  • 4
  • I had a look at [the example](https://stackblitz.com/run?file=src%2Fapp%2Ftree-nested-overview-example.ts) and they are not extending the data source, but using it trough composition instead. Have you tried this approach? Just don't extend the `MatTreeNestedDataSource`, but instantiate it and use it like that. – Octavian Mărculescu Nov 07 '22 at 08:28

0 Answers0