Fixes accessibility for grid (#1592)

* adds neccessary code to read cell value for table cells

* formatting
This commit is contained in:
Anthony Dresser
2018-06-11 12:06:06 -07:00
committed by GitHub
parent e50b512580
commit 3be0c5130a
5 changed files with 23 additions and 7 deletions

View File

@@ -0,0 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export function defaultFormatter<T>(valueProperty: keyof T): Slick.Formatter<T> {
return (row: number, cell: number, value: any, columnDef: Slick.Column<T>, dataContext: Slick.SlickData): string => {
return value[valueProperty];
};
}