Merge branch '303-hide-unset-button-when-nothing-is-selected' into 'master'
Adds condition for disabled delete button Closes #303 See merge request bloodyhealth/drip!183
This commit is contained in:
@@ -39,7 +39,10 @@ export default class ActionButtonFooter extends Component {
|
||||
}]
|
||||
)
|
||||
},
|
||||
disabledCondition: !currentSymptomValue,
|
||||
disabledCondition: (!currentSymptomValue ||
|
||||
(Object.keys(currentSymptomValue).length === 0 && currentSymptomValue.constructor === Object) ||
|
||||
(Object.values(currentSymptomValue).every(x => !x) && currentSymptomValue.constructor === Object)
|
||||
),
|
||||
icon: 'delete-outline'
|
||||
}, {
|
||||
title: labels.save,
|
||||
|
||||
Reference in New Issue
Block a user