From 3ec0959cade67cb1571cfddb15af38d627ae5c19 Mon Sep 17 00:00:00 2001 From: Daniel Priori Date: Thu, 30 May 2024 10:31:15 +0200 Subject: [PATCH 1/2] let the whole rule base item be clickable --- .../components/RuleBasedSelectionItem.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/react-components/src/components/RuleBasedOutputs/components/RuleBasedSelectionItem.tsx b/react-components/src/components/RuleBasedOutputs/components/RuleBasedSelectionItem.tsx index e15217d8949..6e1974f9c21 100644 --- a/react-components/src/components/RuleBasedOutputs/components/RuleBasedSelectionItem.tsx +++ b/react-components/src/components/RuleBasedOutputs/components/RuleBasedSelectionItem.tsx @@ -20,7 +20,13 @@ export const RuleBasedSelectionItem = ({ }: RuleBasedSelectionItemProps): ReactElement => { return ( - + { + onChange(id); + }} + justifyContent="space-between" + alignItems="center" + gap={8}> {label} @@ -29,9 +35,6 @@ export const RuleBasedSelectionItem = ({ name={id ?? ''} value={id} checked={checked} - onChange={(_: any, value: string | undefined) => { - onChange(value); - }} /> From 30e56f4408abcbd4f63781498a2c2bebab51dcc1 Mon Sep 17 00:00:00 2001 From: Daniel Priori Date: Thu, 30 May 2024 11:10:15 +0200 Subject: [PATCH 2/2] lint fix --- .../components/RuleBasedSelectionItem.tsx | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/react-components/src/components/RuleBasedOutputs/components/RuleBasedSelectionItem.tsx b/react-components/src/components/RuleBasedOutputs/components/RuleBasedSelectionItem.tsx index 6e1974f9c21..b78ea59ffaf 100644 --- a/react-components/src/components/RuleBasedOutputs/components/RuleBasedSelectionItem.tsx +++ b/react-components/src/components/RuleBasedOutputs/components/RuleBasedSelectionItem.tsx @@ -19,23 +19,17 @@ export const RuleBasedSelectionItem = ({ checked }: RuleBasedSelectionItemProps): ReactElement => { return ( - - { - onChange(id); - }} - justifyContent="space-between" - alignItems="center" - gap={8}> + { + onChange(id); + }} + key={key}> + {label} - + );