Show or hide delete button based on entered data

This commit is contained in:
Julia Friesel
2019-05-17 12:07:54 +02:00
parent 00294ff6f6
commit b7088c44f2
3 changed files with 7 additions and 50 deletions
@@ -41,6 +41,10 @@ export default class SymptomView extends Component {
title={headerTitles[this.symptomName].toLowerCase()}
date={this.date}
goBack={this.handleBackButtonPressOnSymptomView.bind(this)}
deleteIconActive={Object.values(this.state).some(x => {
// is there any meaningful value in the current state?
return x || x === 0
})}
deleteEntry={() => {
Alert.alert(
sharedDialogs.areYouSureTitle,