Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(tree): tree does not initialize when data is set in constructor #22282

Closed
meblum opened this issue Mar 18, 2021 · 1 comment · Fixed by #22340
Closed

bug(tree): tree does not initialize when data is set in constructor #22282

meblum opened this issue Mar 18, 2021 · 1 comment · Fixed by #22340
Assignees
Labels
area: cdk/tree P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@meblum
Copy link

meblum commented Mar 18, 2021

Reproduction

https://stackblitz.com/edit/mat-tree-flat-data-source-bug?file=src/app/tree-flat-overview-example.ts

Steps to reproduce:

  1. Try to initialize the data in the constructor
  2. Run the app

Expected Behavior

The MatTreeFlatDataSource accepts an optional argument initialData. I would expect the data sorce to be properly initialized when set in the constructor.

Actual Behavior

Tree renders as if data is empty

Environment

  • Angular: 11
  • CDK/Material: 11
  • Browser(s): latest chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): windows
@meblum meblum added the needs triage This issue needs to be triaged by the team label Mar 18, 2021
@meblum meblum changed the title bug(COMPONENT): TITLE bug(tree): tree does not initialize when data is set in constructor Mar 18, 2021
@jelbourn jelbourn added area: cdk/tree P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels Mar 18, 2021
@crisbeto crisbeto self-assigned this Mar 25, 2021
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 25, 2021
The `MatTreeFlatDataSource` has an `initialData` parameter which doesn't work, because it only assigns the data to one of the three streams used to render the tree.

These changes also make some underscored properties private.

Fixes angular#22282.
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 29, 2021
The `MatTreeFlatDataSource` has an `initialData` parameter which doesn't work, because it only assigns the data to one of the three streams used to render the tree.

These changes also make some underscored properties private.

Fixes angular#22282.
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 30, 2021
The `MatTreeFlatDataSource` has an `initialData` parameter which doesn't work, because it only assigns the data to one of the three streams used to render the tree.

These changes also make some underscored properties private.

Fixes angular#22282.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 7, 2021
The `MatTreeFlatDataSource` has an `initialData` parameter which doesn't work, because it only assigns the data to one of the three streams used to render the tree.

These changes also make some underscored properties private.

Fixes angular#22282.
mmalerba pushed a commit that referenced this issue Apr 8, 2021
…22340)

The `MatTreeFlatDataSource` has an `initialData` parameter which doesn't work, because it only assigns the data to one of the three streams used to render the tree.

These changes also make some underscored properties private.

Fixes #22282.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cdk/tree P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants