From c5eea384152aed5b8d5d03001a126e87013dcbea Mon Sep 17 00:00:00 2001 From: liaoxuezhi <2betop.cn@gmail.com> Date: Wed, 23 Feb 2022 10:28:44 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=AD=90=E8=A1=A8=E5=8D=95=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=BB=98=E8=AE=A4=E5=85=B3=E9=97=AD=E4=B8=A5=E6=A0=BC?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F,=20=E5=8F=AF=E4=BB=A5=E5=AE=9E=E6=97=B6?= =?UTF-8?q?=E6=8B=BF=E5=88=B0=E5=A4=96=E9=83=A8=E6=9C=80=E6=96=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=20(#3626)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 这个组件默认关闭严格模式, 可以实时拿到外部最新数据 * 修复用例问题 --- __tests__/renderers/Form/buttonGroup.test.tsx | 10 +++++----- src/renderers/Form/InputSubForm.tsx | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/__tests__/renderers/Form/buttonGroup.test.tsx b/__tests__/renderers/Form/buttonGroup.test.tsx index 78ab67347..5cae0e88a 100644 --- a/__tests__/renderers/Form/buttonGroup.test.tsx +++ b/__tests__/renderers/Form/buttonGroup.test.tsx @@ -85,14 +85,14 @@ test('Renderer:button-group:multiple clearable', async () => { makeEnv() ) ); - await wait(100); + await wait(200); fireEvent.click(getByText(/Option A/)); - await wait(100); + await wait(200); fireEvent.click(getByText(/Option B/)); - await wait(300); + await wait(600); expect(container).toMatchSnapshot(); - await wait(100); + await wait(200); fireEvent.click(getByText(/Option B/)); - await wait(300); + await wait(600); expect(container).toMatchSnapshot(); }); diff --git a/src/renderers/Form/InputSubForm.tsx b/src/renderers/Form/InputSubForm.tsx index c69f87cf6..452997db8 100644 --- a/src/renderers/Form/InputSubForm.tsx +++ b/src/renderers/Form/InputSubForm.tsx @@ -524,6 +524,7 @@ export default class SubFormControl extends React.PureComponent< @FormItem({ type: 'input-sub-form', - sizeMutable: false + sizeMutable: false, + strictMode: false }) export class SubFormControlRenderer extends SubFormControl {}