Work item delete working

This commit is contained in:
John Lyon-Smith
2018-04-06 15:57:24 -07:00
parent 57f98ad398
commit 1c222f06e9
4 changed files with 82 additions and 38 deletions

View File

@@ -66,7 +66,7 @@ export class WorkItem extends React.Component {
isValid: (r, v) => v !== "",
},
workItemType: {
isValid: true,
isValid: (r, v) => v !== "",
alwaysGet: true,
},
}
@@ -171,14 +171,11 @@ export class WorkItem extends React.Component {
@autobind
handleRegionChange(region) {
const { binder } = this.state
this.setState(
binder.updateFieldValue(
"location",
if (this.latLngInput) {
this.latLngInput.handleChangeText(
formatLatLng(region.latitude, region.longitude)
)
)
}
}
render() {
@@ -200,6 +197,7 @@ export class WorkItem extends React.Component {
name="workItemType"
label="Work Item Type:"
options={workItemTypeEnum}
message="Select a work item type"
/>
</View>
<View style={styles.panel}>
@@ -235,7 +233,12 @@ export class WorkItem extends React.Component {
pointerEvents={false}
/>
</MapView>
<BoundInput binder={binder} name="location" label="Location:" />
<BoundInput
ref={(ref) => (this.latLngInput = ref)}
binder={binder}
name="location"
label="Location:"
/>
</View>
<View style={styles.panel}>
<Text style={styles.label}>Pictures:</Text>