Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(mat-table): New option "mat-filter-header" for filterable columns like mat-sort-header #28741

Closed
Labels
featureThis issue represents a new feature or feature request rather than a bug or bug fix needs triageThis issue needs to be triaged by the team
@ngdevc

Description

Feature Description

It will specify the column which is filterable by dataSource.filter. It could be used mat-filter-header like mat-sort-header in the Template side.

Use Case

For the below case, we need to filter only for the visible columns, not real data.
If we set dataSource.filter = 1234, the first element is shown even though Users only see two columns "name" & "value" and there is no matching values. This makes users too confused.
So if we set up filterable columns, we can prevent this issue.

const displayedColumns = ['name', 'value'];
const dataSource = [
 {id: 1234, name: 'AA', value: 65},
 {id: 12345, name: 'BB', value: 67}
];

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue represents a new feature or feature request rather than a bug or bug fix needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /