From 8c1732a0867c70166bbef804e13f0122ce419b38 Mon Sep 17 00:00:00 2001 From: mertmit Date: Thu, 29 Jun 2023 13:38:41 +0300 Subject: [PATCH] fix: disable edit mode on closing picker Signed-off-by: mertmit --- packages/nc-gui/components/cell/DatePicker.vue | 2 ++ packages/nc-gui/components/cell/DateTimePicker.vue | 2 ++ packages/nc-gui/components/cell/TimePicker.vue | 2 ++ packages/nc-gui/components/cell/YearPicker.vue | 2 ++ 4 files changed, 8 insertions(+) diff --git a/packages/nc-gui/components/cell/DatePicker.vue b/packages/nc-gui/components/cell/DatePicker.vue index 019eb1e586..5cde5ec01f 100644 --- a/packages/nc-gui/components/cell/DatePicker.vue +++ b/packages/nc-gui/components/cell/DatePicker.vue @@ -70,6 +70,8 @@ watch( (next) => { if (next) { onClickOutside(document.querySelector(`.${randomClass}`)! as HTMLDivElement, () => (open.value = false)) + } else { + editable.value = false } }, { flush: 'post' }, diff --git a/packages/nc-gui/components/cell/DateTimePicker.vue b/packages/nc-gui/components/cell/DateTimePicker.vue index 82362faa69..397ceda16f 100644 --- a/packages/nc-gui/components/cell/DateTimePicker.vue +++ b/packages/nc-gui/components/cell/DateTimePicker.vue @@ -122,6 +122,8 @@ watch( (next) => { if (next) { onClickOutside(document.querySelector(`.${randomClass}`)! as HTMLDivElement, () => (open.value = false)) + } else { + editable.value = false } }, { flush: 'post' }, diff --git a/packages/nc-gui/components/cell/TimePicker.vue b/packages/nc-gui/components/cell/TimePicker.vue index 205b2bed6b..3ea3e8b5a2 100644 --- a/packages/nc-gui/components/cell/TimePicker.vue +++ b/packages/nc-gui/components/cell/TimePicker.vue @@ -69,6 +69,8 @@ watch( (next) => { if (next) { onClickOutside(document.querySelector(`.${randomClass}`)! as HTMLDivElement, () => (open.value = false)) + } else { + editable.value = false } }, { flush: 'post' }, diff --git a/packages/nc-gui/components/cell/YearPicker.vue b/packages/nc-gui/components/cell/YearPicker.vue index 3d9f795b40..58312273a6 100644 --- a/packages/nc-gui/components/cell/YearPicker.vue +++ b/packages/nc-gui/components/cell/YearPicker.vue @@ -55,6 +55,8 @@ watch( (next) => { if (next) { onClickOutside(document.querySelector(`.${randomClass}`)! as HTMLDivElement, () => (open.value = false)) + } else { + editable.value = false } }, { flush: 'post' },