feat(data-table): pass row to display function (#1810)

This commit is contained in:
Alex Rock 2023-10-01 19:19:13 +02:00 committed by GitHub
commit 9456eaab3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 26 deletions

View file

@ -8,7 +8,7 @@ export type DataTableValue = any;
export interface DataTableEmptyHeader {
key: DataTableKey;
empty: boolean;
display?: (item: Value) => DataTableValue;
display?: (item: Value, row: DataTableRow) => DataTableValue;
sort?: false | ((a: DataTableValue, b: DataTableValue) => 0 | -1 | 1);
columnMenu?: boolean;
width?: string;
@ -18,7 +18,7 @@ export interface DataTableEmptyHeader {
export interface DataTableNonEmptyHeader {
key: DataTableKey;
value: DataTableValue;
display?: (item: Value) => DataTableValue;
display?: (item: Value, row: DataTableRow) => DataTableValue;
sort?: false | ((a: DataTableValue, b: DataTableValue) => 0 | -1 | 1);
columnMenu?: boolean;
width?: string;
@ -37,7 +37,7 @@ export type DataTableRowId = any;
export interface DataTableCell {
key: DataTableKey;
value: DataTableValue;
display?: (item: Value) => DataTableValue;
display?: (item: Value, row: DataTableRow) => DataTableValue;
}
type RestProps = SvelteHTMLElements["div"];