Skip to content

Commit 3fd2702

Browse files
committed
Update manual-visits.jsx
1 parent 503a68d commit 3fd2702

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

resources/js/Pages/manual-visits.jsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ export default function () {
496496
encryptHistory: false,
497497
preserveScroll: false,
498498
preserveState: false,
499+
errorBag: null,
500+
onSuccess: (page) => {},
501+
onError: (errors) => {},
502+
onFinish: (visit) => {},
499503
})
500504
`,
501505
},
@@ -513,6 +517,10 @@ export default function () {
513517
encryptHistory: false,
514518
preserveScroll: false,
515519
preserveState: false,
520+
errorBag: null,
521+
onSuccess: (page) => {},
522+
onError: (errors) => {},
523+
onFinish: (visit) => {},
516524
})
517525
`,
518526
},
@@ -530,19 +538,28 @@ export default function () {
530538
encryptHistory: false,
531539
preserveScroll: false,
532540
preserveState: false,
541+
errorBag: null,
542+
onSuccess: (page) => {},
543+
onError: (errors) => {},
544+
onFinish: (visit) => {},
533545
})
534546
`,
535547
},
536548
]}
537549
/>
538550
<P>
539-
All of the parameters are optional. By default, all passed paramaters will be merged with the current page. This
540-
means you are responsible for overriding the current page's URL, component, and props.
551+
All of the parameters are optional. By default, all passed paramaters (except <Code>errorBag</Code>){' '}
552+
will be merged with the current page. This means you are responsible for overriding the current page's
553+
URL, component, and props.
541554
</P>
542555
<P>
543556
If you need access to the current page's props you can pass a function to the props option. This function will
544557
receive the current page's props as an argument and should return the new props.
545558
</P>
559+
<P>
560+
The <Code>errorBag</Code> option allows you to specify which error bag to use when handling validation errors
561+
in the <Code>onError</Code> callback.
562+
</P>
546563
<TabbedCode
547564
examples={[
548565
{

0 commit comments

Comments
 (0)