fix: Add debounce to update due date

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2024-01-12 15:37:04 +01:00
committed by backportbot-nextcloud[bot]
parent ee0b6bfea9
commit ec11bf0468
3 changed files with 15 additions and 3 deletions

View File

@@ -37,7 +37,8 @@
<DueDateSelector :card="card"
:can-edit="canEdit"
@change="updateCardDue" />
@change="updateCardDue"
@input="debouncedUpdateCardDue" />
<div v-if="projectsEnabled" class="section-wrapper">
<CollectionList v-if="card.id"
@@ -68,6 +69,7 @@ import Description from './Description.vue'
import TagSelector from './TagSelector.vue'
import AssignmentSelector from './AssignmentSelector.vue'
import DueDateSelector from './DueDateSelector.vue'
import { debounce } from 'lodash'
export default {
name: 'CardSidebarTabDetails',
@@ -162,6 +164,10 @@ export default {
})
},
debouncedUpdateCardDue: debounce(function(val) {
this.updateCardDue(val)
}, 500),
addLabelToCard(newLabel) {
this.copiedCard.labels.push(newLabel)
const data = {