@@ -496,6 +496,10 @@ export default function () {
496
496
encryptHistory: false,
497
497
preserveScroll: false,
498
498
preserveState: false,
499
+ errorBag: null,
500
+ onSuccess: (page) => {},
501
+ onError: (errors) => {},
502
+ onFinish: (visit) => {},
499
503
})
500
504
` ,
501
505
} ,
@@ -513,6 +517,10 @@ export default function () {
513
517
encryptHistory: false,
514
518
preserveScroll: false,
515
519
preserveState: false,
520
+ errorBag: null,
521
+ onSuccess: (page) => {},
522
+ onError: (errors) => {},
523
+ onFinish: (visit) => {},
516
524
})
517
525
` ,
518
526
} ,
@@ -530,19 +538,28 @@ export default function () {
530
538
encryptHistory: false,
531
539
preserveScroll: false,
532
540
preserveState: false,
541
+ errorBag: null,
542
+ onSuccess: (page) => {},
543
+ onError: (errors) => {},
544
+ onFinish: (visit) => {},
533
545
})
534
546
` ,
535
547
} ,
536
548
] }
537
549
/>
538
550
< 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.
541
554
</ P >
542
555
< P >
543
556
If you need access to the current page's props you can pass a function to the props option. This function will
544
557
receive the current page's props as an argument and should return the new props.
545
558
</ 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 >
546
563
< TabbedCode
547
564
examples = { [
548
565
{
0 commit comments