Skip to content
Snippets Groups Projects
Commit 512250ef authored by bl00dymarie's avatar bl00dymarie
Browse files

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
parents d431c2b9 70d28f7a
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,10 @@ export default class ActionButtonFooter extends Component { ...@@ -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' icon: 'delete-outline'
}, { }, {
title: labels.save, title: labels.save,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment