Skip to content

Commit e172d19

Browse files
andrewseguinjosephperrott
authored andcommitted
chore(table): add sort accessor type to data source (#8222)
1 parent 6e872b7 commit e172d19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ export class MatTableDataSource<T> implements DataSource<T> {
9595
* @param data Data object that is being accessed.
9696
* @param sortHeaderId The name of the column that represents the data.
9797
*/
98-
sortingDataAccessor = (data: T, sortHeaderId: string): string|number => {
98+
sortingDataAccessor: ((data: T, sortHeaderId: string) => string|number) =
99+
(data: T, sortHeaderId: string): string|number => {
99100
const value: any = data[sortHeaderId];
100101

101102
// If the value is a string and only whitespace, return the value.

0 commit comments

Comments
 (0)