Make description of activity optional (#20)

This commit is contained in:
Manuel Bouza
2019-06-26 09:36:27 +02:00
parent 8b2e21c3cf
commit 986fc64998
3 changed files with 8 additions and 4 deletions

View File

@@ -22,9 +22,7 @@ class Form extends Component {
isValid = () => {
const { changeset } = this.props
return ["assignment_id", "task_id", "hours", "description"]
.map(prop => changeset[prop])
.every(Boolean)
return ["assignment_id", "task_id", "hours"].map(prop => changeset[prop]).every(Boolean)
}
handleTextareaKeyDown = event => {