Skip to content

Commit c98c2c5

Browse files
committed
fix(material/table): correct filterPredicate typo (#26902)
(cherry picked from commit fedc9d4)
1 parent 0eebbf3 commit c98c2c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/material/legacy-table/table-data-source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {_MatTableDataSource} from '@angular/material/table';
1414
* sorting (using MatSort), and pagination (using paginator).
1515
*
1616
* Allows for sort customization by overriding sortingDataAccessor, which defines how data
17-
* properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
17+
* properties are accessed. Also allows for filter customization by overriding filterPredicate,
1818
* which defines how row data is converted to a string for filter matching.
1919
*
2020
* **Note:** This class is meant to be a simple data source to help you get started. As such

src/material/table/table-data-source.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ export class _MatTableDataSource<
310310

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

0 commit comments

Comments
 (0)