diff --git a/packages/main/plugins/Cardinality/TotalsPanel/CardinalityTotals.tsx b/packages/main/plugins/Cardinality/TotalsPanel/CardinalityTotals.tsx
index f8ab8719..c570d661 100644
--- a/packages/main/plugins/Cardinality/TotalsPanel/CardinalityTotals.tsx
+++ b/packages/main/plugins/Cardinality/TotalsPanel/CardinalityTotals.tsx
@@ -19,6 +19,7 @@ export default function CardinalityTotals({ isLoading }) {
const sortByProperty = useCallback(
(column: string) => {
+
const numberCols = [
"series_created",
"series_dropped",
@@ -72,8 +73,8 @@ export default function CardinalityTotals({ isLoading }) {
{totals?.length ? (
totals?.map((total, key) => (
diff --git a/packages/main/plugins/Cardinality/TotalsPanel/TotalsRow.tsx b/packages/main/plugins/Cardinality/TotalsPanel/TotalsRow.tsx
index 37c460a7..642d7888 100644
--- a/packages/main/plugins/Cardinality/TotalsPanel/TotalsRow.tsx
+++ b/packages/main/plugins/Cardinality/TotalsPanel/TotalsRow.tsx
@@ -4,7 +4,7 @@ import { type Total } from "../api/types";
import { CellFormatter, getCellData } from "./helper";
import { type MaintainanceActions } from "./types";
import { UndoCardinalityDialog } from "../CardinalityDialog";
-import { Tooltip } from "@mui/material";
+
export function TotalsRow({
headers,
@@ -24,14 +24,14 @@ export function TotalsRow({
))}
-
+
handleUndoFingerprints(total.id)}
/>
-
+
);
diff --git a/packages/main/plugins/Cardinality/TotalsPanel/array_helper.mts b/packages/main/plugins/Cardinality/TotalsPanel/array_helper.mts
index 2ac30364..f884da03 100644
--- a/packages/main/plugins/Cardinality/TotalsPanel/array_helper.mts
+++ b/packages/main/plugins/Cardinality/TotalsPanel/array_helper.mts
@@ -27,8 +27,15 @@ if (!Array.prototype.sortColByString) {
): T[] {
if (sort === "asc") {
return this.sort((a, b) => {
- const colA = a[col].toUpperCase(); // ignore upper and lowercase
- const colB = b[col].toUpperCase(); // ignore upper and lowercase
+ let colA: string, colB: string;
+ if (Array.isArray(a[col])) {
+ colA = a[col]?.join("").toUpperCase();
+ colB = b[col]?.join("").toUpperCase();
+ } else {
+ colA = a[col].toUpperCase(); // ignore upper and lowercase
+ colB = b[col].toUpperCase(); // ignore upper and lowercase
+ }
+
if (colA < colB) {
return -1;
}
@@ -42,8 +49,14 @@ if (!Array.prototype.sortColByString) {
}
return this.sort((a, b) => {
- const colA = a[col].toUpperCase(); // ignore upper and lowercase
- const colB = b[col].toUpperCase(); // ignore upper and lowercase
+ let colA: string, colB: string;
+ if (Array.isArray(a[col])) {
+ colA = a[col]?.join("").toUpperCase();
+ colB = b[col]?.join("").toUpperCase();
+ } else {
+ colA = a[col].toUpperCase(); // ignore upper and lowercase
+ colB = b[col].toUpperCase(); // ignore upper and lowercase
+ }
if (colB < colA) {
return -1;
}