From 639448552405dad85bd1b80d81323f47d88da3db Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 26 Oct 2021 21:29:58 +0200 Subject: [PATCH] fix: create multiple tasks at once with multiline input now correctly uses the titles per line --- src/components/tasks/add-task.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/tasks/add-task.vue b/src/components/tasks/add-task.vue index 3ae8d4f8..4ed3f7c9 100644 --- a/src/components/tasks/add-task.vue +++ b/src/components/tasks/add-task.vue @@ -73,7 +73,7 @@ export default { // Calculating the textarea height based on lines of input in it. That is more reliable when removing a // line from the input. const numberOfLines = newVal.split(/\r\n|\r|\n/).length - const fontSize = parseInt(window.getComputedStyle(this.$refs.newTaskInput, null).getPropertyValue('font-size')) + const fontSize = parseInt(window.getComputedStyle(this.$refs.newTaskInput, null).getPropertyValue('font-size')) this.textAreaHeight = numberOfLines * fontSize * LINE_HEIGHT + INPUT_BORDER_PX }, @@ -98,9 +98,9 @@ export default { if (title === '') { return } - + const task = await this.$store.dispatch('tasks/createNewTask', { - title: this.newTaskTitle, + title, listId: this.$store.state.auth.settings.defaultListId, position: this.defaultPosition, }) @@ -111,7 +111,7 @@ export default { try { await Promise.all(newTasks) this.newTaskTitle = '' - } catch(e) { + } catch (e) { if (e.message === 'NO_LIST') { this.errorMessage = this.$t('list.create.addListRequired') return