mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(data-table): pass row
to display
function (#1810)
This commit is contained in:
parent
24e2a8874f
commit
9456eaab3c
4 changed files with 26 additions and 26 deletions
6
types/DataTable/DataTable.svelte.d.ts
vendored
6
types/DataTable/DataTable.svelte.d.ts
vendored
|
@ -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"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue