Skip to content

Commit

Permalink
Hook up unit info name input
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Jan 11, 2017
1 parent dc4d179 commit 2cca3ea
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/features/unitInfo/UnitInfo/UnitInfo.jsx
Expand Up @@ -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;
Expand All @@ -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>
Expand Down

0 comments on commit 2cca3ea

Please sign in to comment.