From 0cdfb452f470bfc25b716bd5c5da104975a6c1c1 Mon Sep 17 00:00:00 2001 From: Michael Gacek Date: Thu, 18 Jul 2019 19:07:57 +0200 Subject: [PATCH 1/3] Update RadioGroup.js --- Components/RadioGroup.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Components/RadioGroup.js b/Components/RadioGroup.js index 7af82ff0..ffc032b0 100644 --- a/Components/RadioGroup.js +++ b/Components/RadioGroup.js @@ -6,11 +6,9 @@ import * as styles from "./Style/Style" class RadioGroup extends Component { constructor(props) { super(props); - console.log(props) - let selection = "" this.state = { - selection - } + selection: '', + }; this.setChildrenProps = this .setChildrenProps .bind(this) @@ -82,4 +80,4 @@ RadioGroup.defaultProps = { } } -export default RadioGroup; \ No newline at end of file +export default RadioGroup; From 6bb7eba2e067f416b12d042d7c64c00ac924923c Mon Sep 17 00:00:00 2001 From: Michael Gacek Date: Thu, 18 Jul 2019 19:11:24 +0200 Subject: [PATCH 2/3] Update RadioGroup.js --- Components/RadioGroup.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Components/RadioGroup.js b/Components/RadioGroup.js index ffc032b0..1319d9c5 100644 --- a/Components/RadioGroup.js +++ b/Components/RadioGroup.js @@ -19,12 +19,9 @@ class RadioGroup extends Component { * * @memberof RadioGroup */ - getSelection = (value) => { - let selection = value; + getSelection = (selection) => { this.setState({selection}) - this - .props - .getChecked(value) + this.props.getChecked(value) } setChildrenProps = () => { From 2a6ed6de294322239ce3a468f8f963bd07db20da Mon Sep 17 00:00:00 2001 From: Michael Gacek Date: Thu, 18 Jul 2019 19:21:07 +0200 Subject: [PATCH 3/3] Update RadioGroup.js --- Components/RadioGroup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Components/RadioGroup.js b/Components/RadioGroup.js index 1319d9c5..04b26c59 100644 --- a/Components/RadioGroup.js +++ b/Components/RadioGroup.js @@ -21,7 +21,7 @@ class RadioGroup extends Component { */ getSelection = (selection) => { this.setState({selection}) - this.props.getChecked(value) + this.props.getChecked(selection) } setChildrenProps = () => {