expand headers type in DataTableSkeleton, fix DataTableRow type to require "id" (#415)

* feat(data-table-skeleton): support object type for headers

* fix(data-table): require "id" in DataTableRow interface
This commit is contained in:
Eric Liu 2020-11-26 10:28:07 -08:00 committed by GitHub
commit 71c15db2ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 66 additions and 29 deletions

View file

@ -22,7 +22,10 @@ export interface DataTableNonEmptyHeader {
export type DataTableHeader = DataTableNonEmptyHeader | DataTableEmptyHeader;
export type DataTableRow = Record<DataTableKey, DataTableValue>;
export interface DataTableRow {
id: any;
[key: string]: DataTableValue;
}
export type DataTableRowId = string;