Working desc and name fields #3196
This commit is contained in:
parent
52f3d3cccd
commit
830c762b75
@ -29,12 +29,15 @@ export default class DetailsStep extends Component {
|
|||||||
|
|
||||||
onFromAddressChange: PropTypes.func.isRequired,
|
onFromAddressChange: PropTypes.func.isRequired,
|
||||||
onNameChange: PropTypes.func.isRequired,
|
onNameChange: PropTypes.func.isRequired,
|
||||||
|
onDescriptionChange: PropTypes.func.isRequired,
|
||||||
onInputTypeChange: PropTypes.func.isRequired,
|
onInputTypeChange: PropTypes.func.isRequired,
|
||||||
|
|
||||||
fromAddress: PropTypes.string,
|
fromAddress: PropTypes.string,
|
||||||
fromAddressError: PropTypes.string,
|
fromAddressError: PropTypes.string,
|
||||||
name: PropTypes.string,
|
name: PropTypes.string,
|
||||||
nameError: PropTypes.string,
|
nameError: PropTypes.string,
|
||||||
|
description: PropTypes.string,
|
||||||
|
descriptionError: PropTypes.string,
|
||||||
inputType: PropTypes.object,
|
inputType: PropTypes.object,
|
||||||
readOnly: PropTypes.bool
|
readOnly: PropTypes.bool
|
||||||
};
|
};
|
||||||
@ -45,7 +48,7 @@ export default class DetailsStep extends Component {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { accounts } = this.props;
|
const { accounts } = this.props;
|
||||||
const { fromAddress, fromAddressError, name, nameError } = this.props;
|
const { fromAddress, fromAddressError, name, nameError, description, descriptionError } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form>
|
<Form>
|
||||||
@ -62,7 +65,14 @@ export default class DetailsStep extends Component {
|
|||||||
hint='a name for the deployed contract'
|
hint='a name for the deployed contract'
|
||||||
error={ nameError }
|
error={ nameError }
|
||||||
value={ name }
|
value={ name }
|
||||||
onSubmit={ this.onNameChange } />
|
onChange={ this.onNameChange } />
|
||||||
|
|
||||||
|
<Input
|
||||||
|
label='contract description (optional)'
|
||||||
|
hint='a description for the contract'
|
||||||
|
error={ descriptionError }
|
||||||
|
value={ description }
|
||||||
|
onChange={ this.onDescriptionChange } />
|
||||||
|
|
||||||
{ this.renderChooseInputType() }
|
{ this.renderChooseInputType() }
|
||||||
</Form>
|
</Form>
|
||||||
@ -98,12 +108,18 @@ export default class DetailsStep extends Component {
|
|||||||
onFromAddressChange(fromAddress);
|
onFromAddressChange(fromAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
onNameChange = (name) => {
|
onNameChange = (event, name) => {
|
||||||
const { onNameChange } = this.props;
|
const { onNameChange } = this.props;
|
||||||
|
|
||||||
onNameChange(name);
|
onNameChange(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onDescriptionChange = (event, description) => {
|
||||||
|
const { onDescriptionChange } = this.props;
|
||||||
|
|
||||||
|
onDescriptionChange(description);
|
||||||
|
}
|
||||||
|
|
||||||
onInputTypeChange = (inputType, index) => {
|
onInputTypeChange = (inputType, index) => {
|
||||||
const { onInputTypeChange } = this.props;
|
const { onInputTypeChange } = this.props;
|
||||||
onInputTypeChange(inputType, index);
|
onInputTypeChange(inputType, index);
|
||||||
|
Loading…
Reference in New Issue
Block a user