From 0cae7b2e84aff022b6909ab6fbf7a3f69268cd25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 27 Jul 2022 12:46:14 +0300 Subject: [PATCH] space and enter keyboard support --- src/components/treeselect/TreeSelect.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/treeselect/TreeSelect.vue b/src/components/treeselect/TreeSelect.vue index 2243ed367..fe0b161e8 100644 --- a/src/components/treeselect/TreeSelect.vue +++ b/src/components/treeselect/TreeSelect.vue @@ -209,10 +209,14 @@ export default { case 'Space': case 'Enter': - if (!this.overlayVisible) { - this.show(); - event.preventDefault(); + if (this.overlayVisible) { + this.hide(); } + else { + this.show(); + } + + event.preventDefault(); break; case 'Escape':