@evidence-dev/components
Advanced tools
Comparing version 1.1.1 to 1.1.2
# @evidence-dev/components | ||
## 1.1.2 | ||
### Patch Changes | ||
- e8ceec3: Fix sorting bug that caused side effects from components sorting datasets | ||
## 1.1.1 | ||
@@ -4,0 +10,0 @@ |
@@ -1,1 +0,1 @@ | ||
export default function getSortedData(data: any, col: any, isAsc: any): any; | ||
export default function getSortedData(data: any, col: any, isAsc: any): any[]; |
export default function getSortedData(data, col, isAsc) { | ||
return data.sort((a, b) => { | ||
return [...data].sort((a, b) => { | ||
return (a[col] < b[col] ? -1 : 1) * (isAsc ? 1 : -1) | ||
}); | ||
} |
{ | ||
"name": "@evidence-dev/components", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -29,3 +29,2 @@ /** @typedef {typeof __propDef.props} BarChartProps */ | ||
outlineWidth?: any; | ||
annotate?: boolean; | ||
}, { | ||
@@ -65,3 +64,2 @@ [evt: string]: CustomEvent<any>; | ||
outlineWidth?: any; | ||
annotate?: boolean; | ||
}; | ||
@@ -68,0 +66,0 @@ events: { |
@@ -5,3 +5,3 @@ /** @typedef {typeof __propDef.props} ChartProps */ | ||
export default class Chart extends SvelteComponentTyped<{ | ||
data?: any; | ||
data?: any[]; | ||
legend?: boolean; | ||
@@ -44,3 +44,3 @@ title?: any; | ||
props: { | ||
data?: any; | ||
data?: any[]; | ||
legend?: boolean; | ||
@@ -47,0 +47,0 @@ title?: any; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
295501
3825