Skip to content

Commit 5a6b158

Browse files
grnd-altbackportbot[bot]
authored andcommitted
fix(dates): skip unnecessary 500ms wait time for update
Signed-off-by: grnd-alt <git@belakkaf.net>
1 parent 0912d9c commit 5a6b158

3 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/components/card/CardSidebarTabDetails.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@
2020

2121
<StartDateSelector :card="card"
2222
:can-edit="canEdit"
23-
@change="updateCardStartDate"
2423
@input="debouncedUpdateCardStartDate" />
2524

2625
<DueDateSelector :card="card"
2726
:can-edit="canEdit"
28-
@change="updateCardDue"
2927
@input="debouncedUpdateCardDue" />
3028

3129
<DependentCardsSelector :card="card"
@@ -163,7 +161,7 @@ export default {
163161
164162
debouncedUpdateCardDue: debounce(function(val) {
165163
this.updateCardDue(val)
166-
}, 500),
164+
}, 500, { leading: true }),
167165
168166
updateCardStartDate(val) {
169167
this.$store.dispatch('updateCardStartDate', {
@@ -174,7 +172,7 @@ export default {
174172
175173
debouncedUpdateCardStartDate: debounce(function(val) {
176174
this.updateCardStartDate(val)
177-
}, 500),
175+
}, 500, { leading: true }),
178176
179177
addLabelToCard(newLabel) {
180178
this.copiedCard.labels.push(newLabel)

src/components/card/DueDateSelector.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,10 @@ export default defineComponent({
220220
},
221221
removeDue() {
222222
this.duedate = null
223-
this.$emit('change', null)
224223
225224
},
226225
selectShortcut(shortcut) {
227226
this.duedate = shortcut.timestamp
228-
this.$emit('change', shortcut.timestamp)
229227
},
230228
getTimestamp(momentObject) {
231229
return momentObject?.minute(0).second(0).millisecond(0).toDate() || null

src/components/card/StartDateSelector.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ export default defineComponent({
9999
},
100100
removeStartDate() {
101101
this.startdate = null
102-
this.$emit('change', null)
103102
},
104103
},
105104
})

0 commit comments

Comments
 (0)