fix(data-table): type DataTableRowId as "any" #530

Fixes #530
This commit is contained in:
Eric Y Liu 2021-07-14 09:19:04 -07:00
commit 2b9e614e48
5 changed files with 6 additions and 6 deletions

View file

@ -963,7 +963,7 @@ export interface DataTableRow {
[key: string]: DataTableValue;
}
export type DataTableRowId = string;
export type DataTableRowId = any;
export interface DataTableCell {
key: DataTableKey;

View file

@ -2431,9 +2431,9 @@
"ts": "interface DataTableRow { id: any; [key: string]: DataTableValue; }"
},
{
"type": "string",
"type": "any",
"name": "DataTableRowId",
"ts": "type DataTableRowId = string"
"ts": "type DataTableRowId = any"
},
{
"type": "{ key: DataTableKey; value: DataTableValue; display?: (item: Value) => DataTableValue; }",

View file

@ -6,7 +6,7 @@
* @typedef {{ key: DataTableKey; value: DataTableValue; display?: (item: Value) => DataTableValue; sort?: false | ((a: DataTableValue, b: DataTableValue) => (0 | -1 | 1)); columnMenu?: boolean; }} DataTableNonEmptyHeader
* @typedef {DataTableNonEmptyHeader | DataTableEmptyHeader} DataTableHeader
* @typedef {{ id: any; [key: string]: DataTableValue; }} DataTableRow
* @typedef {string} DataTableRowId
* @typedef {any} DataTableRowId
* @typedef {{ key: DataTableKey; value: DataTableValue; display?: (item: Value) => DataTableValue; }} DataTableCell
* @slot {{ row: DataTableRow; }} expanded-row
* @slot {{ header: DataTableNonEmptyHeader; }} cell-header

View file

@ -172,7 +172,7 @@
]}"
rows="{[
{
id: 'a',
id: 0,
name: 'Load Balancer 3',
protocol: 'HTTP',
port: 3000,

View file

@ -28,7 +28,7 @@ export interface DataTableRow {
[key: string]: DataTableValue;
}
export type DataTableRowId = string;
export type DataTableRowId = any;
export interface DataTableCell {
key: DataTableKey;