fix: create multiple tasks at once with multiline input now correctly uses the titles per line
This commit is contained in:
parent
1e4dd415cf
commit
6394485524
1 changed files with 4 additions and 4 deletions
|
@ -73,7 +73,7 @@ export default {
|
||||||
// Calculating the textarea height based on lines of input in it. That is more reliable when removing a
|
// Calculating the textarea height based on lines of input in it. That is more reliable when removing a
|
||||||
// line from the input.
|
// line from the input.
|
||||||
const numberOfLines = newVal.split(/\r\n|\r|\n/).length
|
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
|
this.textAreaHeight = numberOfLines * fontSize * LINE_HEIGHT + INPUT_BORDER_PX
|
||||||
},
|
},
|
||||||
|
@ -100,7 +100,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const task = await this.$store.dispatch('tasks/createNewTask', {
|
const task = await this.$store.dispatch('tasks/createNewTask', {
|
||||||
title: this.newTaskTitle,
|
title,
|
||||||
listId: this.$store.state.auth.settings.defaultListId,
|
listId: this.$store.state.auth.settings.defaultListId,
|
||||||
position: this.defaultPosition,
|
position: this.defaultPosition,
|
||||||
})
|
})
|
||||||
|
@ -111,7 +111,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
await Promise.all(newTasks)
|
await Promise.all(newTasks)
|
||||||
this.newTaskTitle = ''
|
this.newTaskTitle = ''
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
if (e.message === 'NO_LIST') {
|
if (e.message === 'NO_LIST') {
|
||||||
this.errorMessage = this.$t('list.create.addListRequired')
|
this.errorMessage = this.$t('list.create.addListRequired')
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue