From da257108a965d3608dd62568c8c17c295de18adf Mon Sep 17 00:00:00 2001 From: liaoxuezhi <2betop.cn@gmail.com> Date: Fri, 1 Dec 2023 14:53:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20combo=20=E4=B8=AD?= =?UTF-8?q?=E6=9C=89=20pipeIn=20&=20pipeOut=20=E5=9C=BA=E6=99=AF=E6=97=B6?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20Close:=20#8970=20(#8980)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/src/renderers/Form/Combo.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/amis/src/renderers/Form/Combo.tsx b/packages/amis/src/renderers/Form/Combo.tsx index 8e7342856..583fac5ff 100644 --- a/packages/amis/src/renderers/Form/Combo.tsx +++ b/packages/amis/src/renderers/Form/Combo.tsx @@ -544,7 +544,8 @@ export default class ComboControl extends React.Component { const {flat, joinValues, delimiter, type, formItem} = props; // 因为 combo 多个子表单可能同时发生变化。 // onChagne 触发多次,上次变更还没应用到 props.value 上来,这次触发变更就会包含历史数据,把上次触发的数据给重置成旧的了。 - let value = formItem?.tmpValue || props.value; + // 通过 props.getValue() 拿到的是最新的 + let value = props.getValue(); if (joinValues && flat && typeof value === 'string') { value = value.split(delimiter || ',');