angular / angular/components

[Table] Multiple footers/headers with different data

Open
#12,287 11 comments 17 reactions 0 assignees View on GitHub
area: cdk/table feature P5
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Bug, feature request, or proposal:
Feature Request

#### What is the expected behavior?
To be able to make a second footer/header in which I can use the same columns but different data for the cells then the other footer/header

#### What is the current behavior?
Currently you can have multiple mat-footer-rows on a table but it has to have matColumnDefs for each one. IE let's say I have a second footer row that I want to go into the same columns that are setup but with different data. The only way I can see to do this is to make a new array of columns, send that into that footerDef and make the matColumnDefs for those.

#### What are the steps to reproduce?
https://stackblitz.com/edit/angular-tcdbaj

#### What is the use-case or motivation for changing an existing behavior?
The use case is to have multiple footers or headers that have different data, about that column

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.0.9, Newest Material, etc

#### Is there anything else we should know?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior in the linked StackBlitz example and reading the Angular Material table header and footer definitions involved. Done means multiple header or footer rows can reuse the same columns while supplying different cell data, with the existing example demonstrating the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.