From b6b794e42eb5dd04a01080e273d1c135428f5675 Mon Sep 17 00:00:00 2001
From: Beier Luo
Date: Wed, 21 Jun 2023 21:12:57 +1000
Subject: [PATCH] update doc on resetField and dirty check
---
src/content/reset-field.mdx | 14 +++++++-------
src/data/api.tsx | 3 +++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/content/reset-field.mdx b/src/content/reset-field.mdx
index 2a0f3a1f2..11cc84e8a 100644
--- a/src/content/reset-field.mdx
+++ b/src/content/reset-field.mdx
@@ -13,13 +13,13 @@ After invoke this function.
`ResetField` has the ability to retain field state. Here are the options you may want to use:
-| Name | | Type | Description |
-| ------- | -------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `name` | | string | registered field name. |
-| options | `keepError` | boolean | When set to `true`, field error will be retained. |
-| | `keepDirty` | boolean | When set to `true`, `dirtyFields` will be retained. |
-| | `keepTouched` | boolean | When set to `true`, `touchedFields` state will be unchanged. |
-| | `defaultValue` | unknown | When this value is **not** provided, field will be revert back to it's defaultValue.
When this value is provided:
- field will be updated with the supplied value
- field's `defaultValue` will be updated to this value.
|
+| Name | | Type | Description |
+| ------- | -------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `name` | | string | registered field name. |
+| options | `keepError` | boolean | When set to `true`, field error will be retained. |
+| | `keepDirty` | boolean | When set to `true`, `dirtyFields` will be retained. |
+| | `keepTouched` | boolean | When set to `true`, `touchedFields` state will be unchanged. |
+| | `defaultValue` | unknown | When this value is **not** provided, field will be revert back to it's defaultValue.
When this value is provided:
- field will be updated with the supplied value
- field's `defaultValue` will be updated to this value.
- Only support non
undefined value.
|
diff --git a/src/data/api.tsx b/src/data/api.tsx
index fe1c70cb7..a19362d3a 100644
--- a/src/data/api.tsx
+++ b/src/data/api.tsx
@@ -709,6 +709,9 @@ setValue('test', '')
object.
+
+ Do not support custom object, Class or File object.
+
>
),