diff --git a/src/components/DimensionsView.tsx b/src/components/DimensionsView.tsx index 4e30724..6b26b3c 100644 --- a/src/components/DimensionsView.tsx +++ b/src/components/DimensionsView.tsx @@ -41,8 +41,12 @@ export function DimensionsView({ data, headers, onEdit, onSaveRow, onCaptureStat const iw = String(row[COLUMNS.INNER_W] || '0').trim(); const il = String(row[COLUMNS.INNER_L] || '0').trim(); const ih = String(row[COLUMNS.INNER_H] || '0').trim(); - - const key = `${il}x${iw}x${ih}`; + + // Normalize key by sorting dimension values so different orderings + // (e.g. "29x10x15" vs "10x29x15") are treated as the same group + const sortedDims = [parseFloat(il) || 0, parseFloat(iw) || 0, parseFloat(ih) || 0] + .sort((a, b) => a - b); + const key = sortedDims.join('x'); if (!groupMap.has(key)) { groupMap.set(key, []); }