From b182ef6037491180c637eca42c924a9cb3525697 Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Mon, 11 May 2026 08:48:32 +0200 Subject: [PATCH] feat: enable sorting and filtering on CPNP No. column in Cosmetic Items tab --- src/components/CosmeticItemsView.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/CosmeticItemsView.tsx b/src/components/CosmeticItemsView.tsx index 78ca0fc..9148ca4 100644 --- a/src/components/CosmeticItemsView.tsx +++ b/src/components/CosmeticItemsView.tsx @@ -54,7 +54,7 @@ export function CosmeticItemsView({ data, headers, onSaveRow, onCaptureState, ro }, [data, COLUMNS]); const getUniqueValues = (col: number): string[] => - Array.from(columnUniqueValues[col] ?? []).sort(); + Array.from(columnUniqueValues[col] as Set ?? []).sort(); const filteredData = useMemo(() => { let result = data.map((row, index) => ({ row, index })); @@ -190,18 +190,17 @@ export function CosmeticItemsView({ data, headers, onSaveRow, onCaptureState, ro >
!isCpnp && handleSort(col)} + onClick={() => handleSort(col)} > {label} - {!isCpnp && sortCol === col && ( + {sortCol === col && ( sortDesc ? : )} {isCpnp && ( (editable) )}
- {!isCpnp && ( -
+
- )} ); })}