From b31bec59af261f705428ae3548055039d4acf8c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com>
Date: Tue, 25 Apr 2023 09:58:57 +0800
Subject: [PATCH] fix: validated should be reset when trigger reset event
(#41976)
---
.../__snapshots__/demo-extend.test.ts.snap | 35 +++++++++++++++----
.../__snapshots__/demo.test.tsx.snap | 35 +++++++++++++++----
components/form/demo/validate-other.tsx | 12 ++++---
package.json | 2 +-
4 files changed, 65 insertions(+), 19 deletions(-)
diff --git a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap
index eaea42d766..2e0a192dc0 100644
--- a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap
+++ b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap
@@ -20625,14 +20625,35 @@ exports[`renders components/form/demo/validate-other.tsx extend context correctl
-
+
+
+
+
+
+
+
diff --git a/components/form/__tests__/__snapshots__/demo.test.tsx.snap b/components/form/__tests__/__snapshots__/demo.test.tsx.snap
index e6a9307c81..bfd688cd9e 100644
--- a/components/form/__tests__/__snapshots__/demo.test.tsx.snap
+++ b/components/form/__tests__/__snapshots__/demo.test.tsx.snap
@@ -9505,14 +9505,35 @@ exports[`renders components/form/demo/validate-other.tsx correctly 1`] = `
-
+
+
+
+
+
+
+
diff --git a/components/form/demo/validate-other.tsx b/components/form/demo/validate-other.tsx
index 6b492b9b50..a90cd194a2 100644
--- a/components/form/demo/validate-other.tsx
+++ b/components/form/demo/validate-other.tsx
@@ -1,4 +1,3 @@
-import React from 'react';
import { InboxOutlined, UploadOutlined } from '@ant-design/icons';
import {
Button,
@@ -11,9 +10,11 @@ import {
Row,
Select,
Slider,
+ Space,
Switch,
Upload,
} from 'antd';
+import React from 'react';
const { Option } = Select;
@@ -181,9 +182,12 @@ const App: React.FC = () => (
-
+
+
+
+
);
diff --git a/package.json b/package.json
index 8bd41522b2..29a9ea8492 100644
--- a/package.json
+++ b/package.json
@@ -126,7 +126,7 @@
"rc-dialog": "~9.1.0",
"rc-drawer": "~6.1.1",
"rc-dropdown": "~4.0.0",
- "rc-field-form": "~1.29.0",
+ "rc-field-form": "~1.30.0",
"rc-image": "~5.16.0",
"rc-input": "~1.0.4",
"rc-input-number": "~7.4.0",