Skip to content

Commit 124dd5b

Browse files
authored
docs(react-form): Fix field group name (#1675)
These changes harmonizes the occurrences of the password field group for all examples to have the same name.
1 parent b9480c7 commit 124dd5b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/framework/react/guides/form-composition.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ const defaultValues: PasswordFields = {
282282
confirm_password: '',
283283
}
284284

285-
const FieldGroupPasswordField = withFieldGroup({
285+
const FieldGroupPasswordFields = withFieldGroup({
286286
defaultValues,
287287
// You may also restrict the group to only use forms that implement this submit meta.
288288
// If none is provided, any form with the right defaultValues may use it.
@@ -384,7 +384,7 @@ function App() {
384384

385385
return (
386386
<form.AppForm>
387-
<PasswordFields
387+
<FieldGroupPasswordFields
388388
form={form}
389389
// You must specify where the fields can be found
390390
fields="account_data"
@@ -393,7 +393,7 @@ function App() {
393393
<form.Field name="linked_accounts" mode="array">
394394
{(field) =>
395395
field.state.value.map((account, i) => (
396-
<PasswordFields
396+
<FieldGroupPasswordFields
397397
key={account.provider}
398398
form={form}
399399
// The fields may be in nested fields
@@ -439,7 +439,7 @@ function App() {
439439

440440
return (
441441
<form.AppForm>
442-
<PasswordFields
442+
<FieldGroupPasswordFields
443443
form={form}
444444
// You can map the fields to their equivalent deep key
445445
fields={{
@@ -473,7 +473,7 @@ const passwordFields = createFieldMap(defaultValues)
473473
*/
474474

475475
// Usage:
476-
<PasswordFields
476+
<FieldGroupPasswordFields
477477
form={form}
478478
fields={passwordFields}
479479
title="Passwords"

0 commit comments

Comments
 (0)