Skip to content

Commit

Permalink
fix(material/table): correct filterPredicate typo (#26902)
Browse files Browse the repository at this point in the history
(cherry picked from commit fedc9d4)
  • Loading branch information
andrewseguin committed Apr 12, 2023
1 parent 6c00403 commit de22cdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/material/legacy-table/table-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {_MatTableDataSource} from '@angular/material/table';
* sorting (using MatSort), and pagination (using paginator).
*
* Allows for sort customization by overriding sortingDataAccessor, which defines how data
* properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
* properties are accessed. Also allows for filter customization by overriding filterPredicate,
* which defines how row data is converted to a string for filter matching.
*
* **Note:** This class is meant to be a simple data source to help you get started. As such
Expand Down
6 changes: 3 additions & 3 deletions src/material/table/table-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ export class _MatTableDataSource<

/**
* Returns a filtered data array where each filter object contains the filter string within
* the result of the filterTermAccessor function. If no filter is set, returns the data array
* the result of the filterPredicate function. If no filter is set, returns the data array
* as provided.
*/
_filterData(data: T[]) {
// If there is a filter string, filter out data that does not contain it.
// Each data object is converted to a string using the function defined by filterTermAccessor.
// Each data object is converted to a string using the function defined by filterPredicate.
// May be overridden for customization.
this.filteredData =
this.filter == null || this.filter === ''
Expand Down Expand Up @@ -414,7 +414,7 @@ export class _MatTableDataSource<
* sorting (using MatSort), and pagination (using MatPaginator).
*
* Allows for sort customization by overriding sortingDataAccessor, which defines how data
* properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
* properties are accessed. Also allows for filter customization by overriding filterPredicate,
* which defines how row data is converted to a string for filter matching.
*
* **Note:** This class is meant to be a simple data source to help you get started. As such
Expand Down

0 comments on commit de22cdc

Please sign in to comment.