Skip to content

Commit

Permalink
Add tags extendedProperties
Browse files Browse the repository at this point in the history
Close #23
  • Loading branch information
Dennis Plotnik committed Jul 5, 2019
1 parent aa576fc commit a98477f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/components/events/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class NewEvent extends Component {
summary: '',
description: '',
location: '',
tags: '', //[],
}
} else {
foundEvent = events.find(e => e.id === id)
Expand All @@ -45,6 +46,7 @@ export class NewEvent extends Component {
description: foundEvent.description,
location: foundEvent.location,
colorId: foundEvent.colorId,
tags: foundEvent.extendedProperties.private.tags, //.split(','),
}
}

Expand Down Expand Up @@ -124,6 +126,7 @@ export class NewEvent extends Component {
description,
location,
colorId,
tags,
} = this.state

const event = {
Expand All @@ -138,6 +141,11 @@ export class NewEvent extends Component {
description,
location,
colorId,
extendedProperties: {
private: {
tags, //: tags.join(','),
},
},
}

this.setState({
Expand Down Expand Up @@ -172,6 +180,7 @@ export class NewEvent extends Component {
location,
colorId,
foundEvent,
tags,
} = this.state
const _start = start.format('YYYY-MM-DD H:mm')
const _end = end.format('YYYY-MM-DD H:mm')
Expand Down Expand Up @@ -248,6 +257,13 @@ export class NewEvent extends Component {
onChangeColor={this.onChangeColor.bind(this)}
/>
</View>
<View>
<Text>Tags</Text>
<TextInput
value={tags}
onChangeText={this.onChangeText.bind(this, 'tags')}
/>
</View>
<TouchableOpacity onPress={this.onPress}>
<Text>{verb}</Text>
</TouchableOpacity>
Expand Down

0 comments on commit a98477f

Please sign in to comment.