You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/docs/api-reference/utility-functions.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1080,6 +1080,67 @@ Generates an `PathSchema` object for the `schema`, recursively
1080
1080
1081
1081
- PathSchema<T> - The `PathSchema` object for the `schema`
1082
1082
1083
+
### omitExtraData<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>()
1084
+
1085
+
The function takes a schema and formData and returns a copy of the formData with any fields not defined in the schema removed. This is useful for ensuring that only data that is relevant to the schema is preserved. Objects with `additionalProperties` keyword set to `true` will not have their extra fields removed.
0 commit comments