Skip to content

Commit

Permalink
Loosen empty table row header key
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed May 4, 2024
1 parent 788f517 commit 6ca28ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion COMPONENT_INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ export type DataTableKey<Row = DataTableRow> =
export type DataTableValue = any;

export interface DataTableEmptyHeader<Row = DataTableRow> {
key: DataTableKey<Row>;
key: DataTableKey<Row> | string;
empty: boolean;
display?: (item: Value, row: Row) => DataTableValue;
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
Expand Down
4 changes: 2 additions & 2 deletions docs/src/COMPONENT_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -2722,9 +2722,9 @@
"ts": "type DataTableValue = any"
},
{
"type": "{\n key: DataTableKey<Row>;\n empty: boolean;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}",
"type": "{\n key: DataTableKey<Row> | string;\n empty: boolean;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}",
"name": "DataTableEmptyHeader<Row=DataTableRow>",
"ts": "interface DataTableEmptyHeader<Row=DataTableRow> {\n key: DataTableKey<Row>;\n empty: boolean;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}"
"ts": "interface DataTableEmptyHeader<Row=DataTableRow> {\n key: DataTableKey<Row> | string;\n empty: boolean;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}"
},
{
"type": "{\n key: DataTableKey<Row>;\n value: DataTableValue;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}",
Expand Down
2 changes: 1 addition & 1 deletion src/DataTable/DataTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @typedef {import('./DataTableTypes.d.ts').PropertyPath<Row>} DataTableKey<Row=DataTableRow>
* @typedef {any} DataTableValue
* @typedef {{
* key: DataTableKey<Row>;
* key: DataTableKey<Row> | string;
* empty: boolean;
* display?: (item: Value, row: Row) => DataTableValue;
* sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
Expand Down
2 changes: 1 addition & 1 deletion types/DataTable/DataTable.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type DataTableKey<Row = DataTableRow> =
export type DataTableValue = any;

export interface DataTableEmptyHeader<Row = DataTableRow> {
key: DataTableKey<Row>;
key: DataTableKey<Row> | string;
empty: boolean;
display?: (item: Value, row: Row) => DataTableValue;
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
Expand Down

0 comments on commit 6ca28ef

Please sign in to comment.