From bafa79d8c590ba36f2a5ae345da283aac9054956 Mon Sep 17 00:00:00 2001 From: Maarten ter Horst Date: Fri, 25 Nov 2016 14:16:25 +0100 Subject: [PATCH] Temporary fix for #349 and facebook/react#7630 radio widget bug --- src/components/widgets/RadioWidget.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/widgets/RadioWidget.js b/src/components/widgets/RadioWidget.js index 6f210bd885..43ddbcddac 100644 --- a/src/components/widgets/RadioWidget.js +++ b/src/components/widgets/RadioWidget.js @@ -13,6 +13,8 @@ function RadioWidget({ // Generating a unique field name to identify this set of radio buttons const name = Math.random().toString(); const {enumOptions, inline} = options; + // checked={checked} has been moved above name={name}, As mentioned in #349; + // this is a temporary fix for radio button rendering bug in React, facebook/react#7630. return (
{ enumOptions.map((option, i) => { @@ -21,9 +23,9 @@ function RadioWidget({ const radio = ( onChange(option.value)}/>