angular / angular/components

[Table] Feature Request: Make it easier to provide custom data filters to MatTableDataSource

Open
#13,465 4 comments 3 reactions 0 assignees View on GitHub
area: material/table feature P4
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?

I'd like to be able to provide custom data filters.

#### What is the current behavior?

I can only affect how the free text search is executed

#### What are the steps to reproduce?

#### What is the use-case or motivation for changing an existing behavior?

I have a select box, name "Category" that contains a list of categories. User can select one category from this list. The table should filter to show only items in that category.

I also have free form text search and the user may or may not enter something there. (If the free text is empty, the datasource currently does no filtering.)

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

All

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

Thank you for the awesome framework!

Contributor guide

Open the contributing guide

Research direction

Start by locating the MatTableDataSource implementation and its existing free-text filtering behavior. Determine how a category filter could be supplied alongside optional text search, then verify that the table can filter by the selected category without breaking empty-text 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.