A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/markerikson/project-minimek/commit/76e48af2aa77f6224d81e8bb29cb5631c0848de5 below:

Use FormEditWrapper with UnitInfo name input · markerikson/project-minimek@76e48af · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+14

-7

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+14

-7

lines changed Original file line number Diff line number Diff line change

@@ -10,6 +10,8 @@ import {selectUnitInfo} from "../unitInfoSelectors";

10 10

import {updateUnitInfo} from "../unitInfoActions";

11 11

import {getValueFromEvent} from "common/utils/clientUtils";

12 12 13 +

import FormEditWrapper from "common/components/FormEditWrapper";

14 + 13 15

const FACTIONS = [

14 16

{value : "cc", text : "Capellan Confederation"},

15 17

{value : "dc", text : "Draconis Combine"},

@@ -45,20 +47,25 @@ class UnitInfo extends Component {

45 47 46 48 47 49

render() {

48 -

const {unitInfo} = this.props;

50 +

const {unitInfo, updateUnitInfo} = this.props;

49 51

const {name, affiliation} = unitInfo;

50 52 51 53

return (

52 54

<Segment attached="bottom">

53 55

<Form size="large">

54 56

<Form.Field name="name" width={6}>

55 57

<label>Unit Name</label>

56 -

<input

57 -

placeholder="Name"

58 -

name="name"

59 -

value={name}

60 -

onChange={this.onNameChanged}

61 -

/>

58 +

<FormEditWrapper

59 +

singleValue={true}

60 +

value={ {name} }

61 +

onChange={updateUnitInfo}

62 +

passIsEditing={false}

63 +

>

64 +

<input

65 +

placeholder="Name"

66 +

name="name"

67 +

/>

68 +

</FormEditWrapper>

62 69

</Form.Field>

63 70

<Form.Field name="affiliation" width={6}>

64 71

<label>Affiliation</label>

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4