diff --git a/.changeset/cost-insights-pink-boats-exercise.md b/.changeset/cost-insights-pink-boats-exercise.md new file mode 100644 index 0000000000..de66b8d377 --- /dev/null +++ b/.changeset/cost-insights-pink-boats-exercise.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cost-insights': patch +--- + +fix breakdown sorting diff --git a/plugins/cost-insights/src/components/ProductInsightsCard/ProductEntityTable.tsx b/plugins/cost-insights/src/components/ProductInsightsCard/ProductEntityTable.tsx index 5588154ad0..45576bda65 100644 --- a/plugins/cost-insights/src/components/ProductInsightsCard/ProductEntityTable.tsx +++ b/plugins/cost-insights/src/components/ProductInsightsCard/ProductEntityTable.tsx @@ -78,7 +78,7 @@ function createSorter(field?: keyof Omit) { return field ? a[field] - b[field] - : b.previous + b.current - (a.previous - a.current); + : b.previous + b.current - (a.previous + a.current); }; }