From 1f6537af4cef4606c533c3e1167d9dd1998e2449 Mon Sep 17 00:00:00 2001 From: nigi <67454874+wen403@users.noreply.github.com> Date: Fri, 26 Jan 2024 10:19:35 +0800 Subject: [PATCH] fix(components): [select] Remote search does not show menu when it has options and no query (#15683) * fix(components): [select] Remote search does not show menu * fix(components): fix remote search menu issue without a query --- packages/components/select-v2/src/useSelect.ts | 3 +-- packages/components/select/src/useSelect.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/components/select-v2/src/useSelect.ts b/packages/components/select-v2/src/useSelect.ts index 6e32001891..43ffd4525c 100644 --- a/packages/components/select-v2/src/useSelect.ts +++ b/packages/components/select-v2/src/useSelect.ts @@ -358,8 +358,7 @@ const useSelect = (props: ISelectV2Props, emit) => { // methods const toggleMenu = () => { if (selectDisabled.value) return - if (props.filterable && props.remote && isFunction(props.remoteMethod)) - return + if (states.menuVisibleOnFocus) { // controlled by automaticDropdown states.menuVisibleOnFocus = false diff --git a/packages/components/select/src/useSelect.ts b/packages/components/select/src/useSelect.ts index 22a79de144..b8439c7e70 100644 --- a/packages/components/select/src/useSelect.ts +++ b/packages/components/select/src/useSelect.ts @@ -687,8 +687,7 @@ export const useSelect = (props: ISelectProps, emit) => { const toggleMenu = () => { if (selectDisabled.value) return - if (props.filterable && props.remote && isFunction(props.remoteMethod)) - return + if (states.menuVisibleOnFocus) { // controlled by automaticDropdown states.menuVisibleOnFocus = false