From 1bf28f7f02ebb31f735bd527f9c0d1dbe9c26d13 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Fri, 27 Dec 2024 12:38:18 +0100 Subject: [PATCH] fix(NcColorPicker): close popover on submit event Signed-off-by: Maksim Sukharev --- .../NcColorPicker/NcColorPicker.vue | 107 +++++++++--------- src/components/NcPopover/NcPopover.vue | 4 +- 2 files changed, 57 insertions(+), 54 deletions(-) diff --git a/src/components/NcColorPicker/NcColorPicker.vue b/src/components/NcColorPicker/NcColorPicker.vue index 51d208b838..5ef4baebb0 100644 --- a/src/components/NcColorPicker/NcColorPicker.vue +++ b/src/components/NcColorPicker/NcColorPicker.vue @@ -71,7 +71,7 @@ export default { @@ -363,13 +365,14 @@ export default { /** * Submit a picked colour and close picker + * @param {Function} hideCallback callback to close popover */ - handleConfirm() { + handleConfirm(hideCallback) { /** * Emits a hexadecimal string e.g. '#ffffff' */ this.$emit('submit', this.currentColor) - this.handleClose() + hideCallback() this.advanced = false }, diff --git a/src/components/NcPopover/NcPopover.vue b/src/components/NcPopover/NcPopover.vue index 618e9ff6f4..f95040348e 100644 --- a/src/components/NcPopover/NcPopover.vue +++ b/src/components/NcPopover/NcPopover.vue @@ -157,8 +157,8 @@ See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/ -