Files
azuredatastudio/src/sql/base/browser/ui/table/utils.ts
Anthony Dresser 3be0c5130a Fixes accessibility for grid (#1592)
* adds neccessary code to read cell value for table cells

* formatting
2018-06-11 12:06:06 -07:00

11 lines
591 B
TypeScript

/*---------------------------------------------------------------------------------------------
* 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];
};
}