Auto save whenever symptom view updates

This commit is contained in:
Julia Friesel
2019-05-26 07:39:15 +02:00
parent f8eef66810
commit bc358bd9ed
9 changed files with 15 additions and 18 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ export default class Sex extends SymptomView {
symptomName = "sex"
onBackButtonPress() {
autoSave = () => {
const nothingEntered = Object.values(this.state).every(val => !val)
if (nothingEntered) {
this.deleteSymptomEntry()