if( props.readonly && props.type == "checkbox" && props.checked ) {
displayedValue = <img src={CircleSVG} />
}
+
+ if( props.readonly && props.type == "radiogroup" && props.readonlydisplay ) {
+ displayedValue = props.readonlydisplay
+ }
+
let html = (
<label className={className} style={props.style}>
<span> { label } {isRequired}</span>
<div className={className}>
{
props.options.map((o,i) => {
+ let label = o.label || o;
+ let value = o.value || o;
return (
<label key={i}>
- {o.label}
- <input type="radio" checked={props.value == o.value} value={o.value} onChange={props.onChange} />
+ {label}
+ <input type="radio" checked={props.value == value} value={value} onChange={props.onChange} />
</label>
)
})