Permalink
Browse files

Use FormEditWrapper with UnitInfo name input

  • Loading branch information...
markerikson committed Jan 10, 2017
1 parent c321c35 commit 76e48af2aa77f6224d81e8bb29cb5631c0848de5
Showing with 14 additions and 7 deletions.
  1. +14 −7 src/features/unitInfo/UnitInfo/UnitInfo.jsx
@@ -10,6 +10,8 @@ import {selectUnitInfo} from "../unitInfoSelectors";
import {updateUnitInfo} from "../unitInfoActions";
import {getValueFromEvent} from "common/utils/clientUtils";
import FormEditWrapper from "common/components/FormEditWrapper";
const FACTIONS = [
{value : "cc", text : "Capellan Confederation"},
{value : "dc", text : "Draconis Combine"},
@@ -45,20 +47,25 @@ class UnitInfo extends Component {
render() {
const {unitInfo} = this.props;
const {unitInfo, updateUnitInfo} = this.props;
const {name, affiliation} = unitInfo;
return (
<Segment attached="bottom">
<Form size="large">
<Form.Field name="name" width={6}>
<label>Unit Name</label>
<input
placeholder="Name"
name="name"
value={name}
onChange={this.onNameChanged}
/>
<FormEditWrapper
singleValue={true}
value={ {name} }
onChange={updateUnitInfo}
passIsEditing={false}
>
<input
placeholder="Name"
name="name"
/>
</FormEditWrapper>
</Form.Field>
<Form.Field name="affiliation" width={6}>
<label>Affiliation</label>

0 comments on commit 76e48af

Please sign in to comment.