From 6860ff6b20406a9de53dca9106a35f660ae8485c Mon Sep 17 00:00:00 2001 From: Aman Bhardwaj Date: Fri, 2 Feb 2024 01:21:48 +0530 Subject: [PATCH] #10191 Feat: Auto ordering of groups on comparision tab done --- .../groupComparison/groupSelector/GroupSelector.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/groupComparison/groupSelector/GroupSelector.tsx b/src/pages/groupComparison/groupSelector/GroupSelector.tsx index f8cdc825fc6..8568434117d 100644 --- a/src/pages/groupComparison/groupSelector/GroupSelector.tsx +++ b/src/pages/groupComparison/groupSelector/GroupSelector.tsx @@ -206,6 +206,15 @@ export default class GroupSelector extends React.Component< index={buttons.length} /> ); + // Logic To Put Primary First + let buttons_: any[] = []; + buttons_[0] = buttons[1]; + buttons_[1] = buttons[0]; + // console.log("chk", buttons[0].props.group, buttons[1].props.group, buttons_[0].props.group, buttons_[1].props.group) + buttons_[0].props.group.ordinal = 'A'; + buttons_[1].props.group.ordinal = 'B'; + // buttons_[0].props.group.nameWithOrdinal = buttons[1].props.group.nameWithOrdinal; + // buttons_[1].props.group.nameWithOrdinal = buttons[0].props.group.nameWithOrdinal; return (