From 2e7e9389c038a14f4b8bddc19246906b7bc5bf13 Mon Sep 17 00:00:00 2001 From: Al-Raheem Date: Thu, 9 May 2019 14:35:41 +0800 Subject: [PATCH 1/2] fix: fixes #11 fixes issue #11 causing radio button conflicts in radiogroup component #11 --- src/RadioGroup/RadioGroup.tsx | 39 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/RadioGroup/RadioGroup.tsx b/src/RadioGroup/RadioGroup.tsx index 0f98cc0eb..30e9dd477 100644 --- a/src/RadioGroup/RadioGroup.tsx +++ b/src/RadioGroup/RadioGroup.tsx @@ -31,25 +31,26 @@ export const RadioGroup: React.FunctionComponent = (props: Radi
{props.label && } - {props.list && props.list.map((item, index) => -
- - - { props.onChange(item.value); }} - /> - - - {item.description && {item.description}} -
- )} + {props.list && props.list.map((item, index) => { + const identifier: string = item.label.replace(" ", "_") + Math.floor(Math.random() * 100) + (new Date()).getTime(); + return ( +
+ + { props.onChange(item.value); }} + /> + + {item.description && {item.description}} +
+ ); + })} {props.error &&
{props.error}
}
From 51a3ba096c3d6e2b4687061bd8aefd875f1f3852 Mon Sep 17 00:00:00 2001 From: Al-Raheem Date: Thu, 9 May 2019 14:47:19 +0800 Subject: [PATCH 2/2] fix: fixes #12 fixed radio buttons vertical alignment seen when using it inline #12 --- src/RadioGroup/radio-group-style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RadioGroup/radio-group-style.scss b/src/RadioGroup/radio-group-style.scss index be57996c5..3d1fbcff6 100644 --- a/src/RadioGroup/radio-group-style.scss +++ b/src/RadioGroup/radio-group-style.scss @@ -15,6 +15,7 @@ $red: #F03529; user-select: none; transition: all $transition-time; .radio-item { + vertical-align: top; position: relative; margin-bottom: 5px; input[type=radio] {