Skip to content

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

Closed

Description

@meblum

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

Activity

  1. added
    needs triage
    on Mar 18, 2021
  2. changed the title [-]bug(COMPONENT): TITLE[/-] [+]bug(tree): tree does not initialize when data is set in constructor[/+] on Mar 18, 2021
  3. added
    P3
    and removed
    needs triage
    on Mar 18, 2021
  4. self-assigned this
    on Mar 25, 2021
  5. added 3 commits that reference this issue on Mar 25, 2021
    2693a46
    94df9fb
    750ee4e
  6. added a commit that references this issue on Apr 7, 2021
    29f7eee
  7. added a commit that references this issue on Apr 8, 2021
    fa7ed4c
  8. angular-automatic-lock-bot commented on May 9, 2021

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3area: cdk/tree

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions