Skip to content
Snippets Groups Projects
Commit 70d28f7a authored by emelko's avatar emelko
Browse files

Adds 2 conditions for disabling delete button

parent d431c2b9
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
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