From 9a1ff2cff2d5a36950f88b05bc7707f8b0bca871 Mon Sep 17 00:00:00 2001 From: Lee Chase Date: Wed, 9 Sep 2020 19:30:26 +0100 Subject: [PATCH] fix: click outside dropdown (#1013) Co-authored-by: Lee Chase --- .../src/components/cv-dropdown/cv-dropdown.vue | 13 +++++-------- packages/core/src/directives/clickout.js | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 packages/core/src/directives/clickout.js diff --git a/packages/core/src/components/cv-dropdown/cv-dropdown.vue b/packages/core/src/components/cv-dropdown/cv-dropdown.vue index 44f729726..b0825b4b0 100644 --- a/packages/core/src/components/cv-dropdown/cv-dropdown.vue +++ b/packages/core/src/components/cv-dropdown/cv-dropdown.vue @@ -54,6 +54,7 @@ @keydown.esc.prevent="onEsc" @keydown.tab="onTab" @click="onClick" + v-clickout="onClickout" ref="listbox" >