Make a repaint to show selection changes
This commit is contained in:
parent
6a31f30e6c
commit
2ff4e08c4e
@ -51,6 +51,19 @@ const selection = ref({ startDate: null, dayCount: 0 })
|
|||||||
const isDragging = ref(false)
|
const isDragging = ref(false)
|
||||||
const dragAnchor = ref(null)
|
const dragAnchor = ref(null)
|
||||||
|
|
||||||
|
// Rebuild visible weeks whenever selection changes so day.isSelected stays in sync.
|
||||||
|
watch(
|
||||||
|
() => [selection.value.startDate, selection.value.dayCount],
|
||||||
|
() => {
|
||||||
|
// Skip if no selection (both null/0) to avoid unnecessary work.
|
||||||
|
if (!selection.value.startDate || selection.value.dayCount === 0) {
|
||||||
|
scheduleRebuild('selection-clear')
|
||||||
|
} else {
|
||||||
|
scheduleRebuild('selection')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
const DOUBLE_TAP_DELAY = 300
|
const DOUBLE_TAP_DELAY = 300
|
||||||
const pendingTap = ref({ date: null, time: 0, type: null })
|
const pendingTap = ref({ date: null, time: 0, type: null })
|
||||||
const suppressMouseUntil = ref(0)
|
const suppressMouseUntil = ref(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user