mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(data-table): loosen sort
return type to be a number
(#1935)
Fixes #1934 Loosen the `sort` return type from `0 | 1 | -1` to `number`.
This commit is contained in:
parent
21b1d78d8e
commit
9132bf8e5a
4 changed files with 11 additions and 11 deletions
4
types/DataTable/DataTable.svelte.d.ts
vendored
4
types/DataTable/DataTable.svelte.d.ts
vendored
|
@ -9,7 +9,7 @@ export interface DataTableEmptyHeader {
|
|||
key: DataTableKey;
|
||||
empty: boolean;
|
||||
display?: (item: Value, row: DataTableRow) => DataTableValue;
|
||||
sort?: false | ((a: DataTableValue, b: DataTableValue) => 0 | -1 | 1);
|
||||
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
||||
columnMenu?: boolean;
|
||||
width?: string;
|
||||
minWidth?: string;
|
||||
|
@ -19,7 +19,7 @@ export interface DataTableNonEmptyHeader {
|
|||
key: DataTableKey;
|
||||
value: DataTableValue;
|
||||
display?: (item: Value, row: DataTableRow) => DataTableValue;
|
||||
sort?: false | ((a: DataTableValue, b: DataTableValue) => 0 | -1 | 1);
|
||||
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
||||
columnMenu?: boolean;
|
||||
width?: string;
|
||||
minWidth?: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue