Render correctly when query input is false in a contract (#6137)

This commit is contained in:
Enrique Fynn 2017-07-25 08:45:14 +02:00 committed by Gav Wood
parent 58fec9181f
commit 985b0fbf7f

View File

@ -360,10 +360,10 @@ export default class TypedInput extends Component {
renderBoolean () { renderBoolean () {
const { allowCopy, className, label, error, hint, readOnly } = this.props; const { allowCopy, className, label, error, hint, readOnly } = this.props;
const value = this.getValue(); const value = this.getValue() ? 'true' : 'false';
if (readOnly) { if (readOnly) {
return this.renderDefault(); return this.renderDefault(value);
} }
const boolitems = ['false', 'true'].map((bool) => { const boolitems = ['false', 'true'].map((bool) => {
@ -386,11 +386,7 @@ export default class TypedInput extends Component {
hint={ hint } hint={ hint }
label={ label } label={ label }
onChange={ this.onChangeBool } onChange={ this.onChangeBool }
value={ value={ value }
value
? 'true'
: 'false'
}
> >
{ boolitems } { boolitems }
</Select> </Select>