Permalink
Browse files

Hook up unit info name input

  • Loading branch information...
markerikson committed Jan 2, 2017
1 parent dc4d179 commit 2cca3ead0f131ec66714998ff1c0f286dbbc2c28
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/features/unitInfo/UnitInfo/UnitInfo.jsx
@@ -37,6 +37,13 @@ class UnitInfo extends Component {
this.props.updateUnitInfo(newValues);
}
onNameChanged = (e) => {
const {name, value} = e.target;
const newValues = { [name] : value};
this.props.updateUnitInfo(newValues);
}
render() {
const {unitInfo} = this.props;
@@ -47,7 +54,12 @@ class UnitInfo extends Component {
<Form size="large">
<Form.Field name="name" width={6}>
<label>Unit Name</label>
<input placeholder="Name" name="name" value={name}/>
<input
placeholder="Name"
name="name"
value={name}
onChange={this.onNameChanged}
/>
</Form.Field>
<Form.Field name="affiliation" width={6}>
<label>Affiliation</label>

0 comments on commit 2cca3ea

Please sign in to comment.