Skip to content

Commit 8b89094

Browse files
committed
chore: pr comments
1 parent 6323166 commit 8b89094

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,15 @@ export function CustomTextField({ label }: { label: string }) {
208208

209209
```tsx AppForm.tsx
210210
// notice the same import as above
211-
import ProfileForm from 'Weyland-Yutan-corp/forms'
211+
import ProfileForm from 'weyland-yutan-corp/forms'
212212

213213
import { CustomTextField } from './FieldComponents/CustomTextField'
214-
import { CustomSubmit } from './FormComponents/CustomSubmit'
214+
import { SubmitButton } from './FormComponents/SubmitButton'
215215

216216
export const { useAppForm } = ProfileForm.extendForm({
217217
fieldComponents: { CustomTextField },
218218
// Ts will error since the parent appForm already has a component called CustomSubmit
219-
formComponents: { CustomSubmit },
219+
formComponents: { SubmitButton },
220220
})
221221
```
222222

examples/react/composition/src/AppForm/FieldComponents/TextField.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export function TextField({ label }: { label: string }) {
99
<input
1010
value={field.state.value}
1111
onChange={(e) => field.handleChange(e.target.value)}
12+
onBlur={() => field.handleBlur()}
1213
/>
1314

1415
<>

examples/react/composition/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default function App() {
4848
},
4949
}}
5050
>
51-
{(f) => <f.TextField label="last name" />}
51+
{(f) => <f.TextField label="first name" />}
5252
</form.AppField>
5353

5454
<form.AppField name="lastName">

0 commit comments

Comments
 (0)