When nothing entered, delete entry

This commit is contained in:
Julia Friesel
2019-05-12 12:47:05 +02:00
parent 08fd3afc34
commit ecf3ebf16d
10 changed files with 101 additions and 39 deletions
+8 -2
View File
@@ -24,8 +24,14 @@ export default class Note extends SymptomView {
}
}
save() {
saveSymptom('note', this.props.date, {
symptomName = 'note'
onBackButtonPress() {
if (!this.state.currentValue) {
this.deleteSymptomEntry()
return
}
this.saveSymptomEntry({
value: this.state.currentValue
})
}