angular / angular/components

Support adding/removing table headers and footers

Open
#22,548 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: cdk/table feature G P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

Currently CdkTable doesn't offer a way to add/remove headers and footers dynamically. Users can hide and show them with CSS, but they always remain in the DOM.

I think we could support this in one of two ways:

  1. Add some code to the content query for defs to watch for changes and re-render
  2. Support doing this with when (or maybe a similar API)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the CdkTable implementation, especially its content query for header and footer definitions. Compare the proposed approaches: watching definition changes and re-rendering, or supporting dynamic changes through when or a similar API. Done means users can add or remove table headers and footers dynamically so the corresponding elements are no longer left in the DOM.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.