Skip to content

feature([matTable]): matHeaderRowDef added later is not rendered #19209

Open
@jonahd-g

Description

@jonahd-g

Reproduction

Use StackBlitz to reproduce this issue: https://stackblitz.com/edit/angular-uwdzcb

Any headers not specified upon initial rendering are not added. If a matHeaderRowDef is added later on during the lifetime of the component, it will never show up. It seems like the table renderer needs to be altered to keep checking for changes to the present matHeaderRowDef instances.

Steps to reproduce:

  1. Click the "Click to Add Rows" text
  2. Look at table head rows

Expected Behavior

A second header row should be visible, with a column titled "Name of the Purchased Item"

Actual Behavior

The second header row is not recognized and rendered, even if renderRows() is called.

Environment

  • Angular:9.1.3
  • CDK/Material: 9.2.1
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): gLinux

Metadata

Metadata

Assignees

No one assigned

    Labels

    GThis is is related to a Google internal issueP4A relatively minor issue that is not relevant to core functionsarea: material/tablefeatureThis issue represents a new feature or feature request rather than a bug or bug fixneeds: discussionFurther discussion with the team is needed before proceeding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions