-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/table
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Filter text should not be required for using a filter when a custom filterPredicate is supplied
What is the current behavior?
Filter text must be truthy in order to use a filterPredicate which does not require filter text
What are the steps to reproduce?
Make a filterPredicate which does not depend on the filter value
What is the use-case or motivation for changing an existing behavior?
Filter predicates which do not require the filter text (for example, checking that a value in the data is past the current date)
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Current
Is there anything else we should know?
https://github.com/angular/material2/blob/master/src/lib/table/table-data-source.ts#L213
!this.filter ? data : data.filter(obj => this.filterPredicate(obj, this.filter));
Instead of !this.filter ?
check if a filterPredicate has been supplied
hudzenko, rubentrf, dannyrandall, andreisrob, NatoBoram and 5 more
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/table