From e172d19f9b39d1cf6f50ec210bbdbc462bfc3d82 Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Mon, 6 Nov 2017 13:58:40 -0800 Subject: [PATCH] chore(table): add sort accessor type to data source (#8222) --- src/lib/table/table-data-source.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/table/table-data-source.ts b/src/lib/table/table-data-source.ts index f45e427afff..71f408a2273 100644 --- a/src/lib/table/table-data-source.ts +++ b/src/lib/table/table-data-source.ts @@ -95,7 +95,8 @@ export class MatTableDataSource implements DataSource { * @param data Data object that is being accessed. * @param sortHeaderId The name of the column that represents the data. */ - sortingDataAccessor = (data: T, sortHeaderId: string): string|number => { + sortingDataAccessor: ((data: T, sortHeaderId: string) => string|number) = + (data: T, sortHeaderId: string): string|number => { const value: any = data[sortHeaderId]; // If the value is a string and only whitespace, return the value.