From b952038db10a7e885258e3f9d20022f2a4ba48f5 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 27 Jan 2022 17:07:23 +0800 Subject: [PATCH] fix: tree-select enter error, close #5217 --- components/vc-tree-select/OptionList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/vc-tree-select/OptionList.tsx b/components/vc-tree-select/OptionList.tsx index d7238ba3f..13e937710 100644 --- a/components/vc-tree-select/OptionList.tsx +++ b/components/vc-tree-select/OptionList.tsx @@ -152,7 +152,7 @@ export default defineComponent({ // >>> Select item case KeyCode.ENTER: { const { selectable, value } = activeEntity.value?.node || {}; - if (selectable !== false) { + if (activeEntity.value && selectable !== false) { onInternalSelect(null, { node: { key: activeKey.value }, selected: !legacyContext.checkedKeys.includes(value),