From 2e22b221c9a22b810c0015ff082bda48e1529259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A1=E5=B1=B1=E7=94=B5=E8=BD=A6?= Date: Sun, 19 Sep 2021 09:14:54 +0800 Subject: [PATCH] fix(select): mergedValue shouldn't modified by outValue (#4670) --- components/vc-select/generate.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/vc-select/generate.tsx b/components/vc-select/generate.tsx index d0fc54f65..f83a91d89 100644 --- a/components/vc-select/generate.tsx +++ b/components/vc-select/generate.tsx @@ -629,7 +629,10 @@ export default function generateSelector< props.onChange(outValue, isMultiple.value ? outOptions : outOptions[0]); } - mergedValue.value = outValue; + + if (props.value === undefined) { + mergedValue.value = outValue; + } }; const onInternalSelect = (