File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import { Handler, WizardProps } from './types';
44import WizardContext from './wizardContext' ;
55
66const Wizard : React . FC < WizardProps > = React . memo (
7- ( { header, footer, startIndex = 0 , children } ) => {
8- const [ activeStep , setActiveStep ] = React . useState ( startIndex ) ;
7+ ( { header, footer, children } ) => {
8+ const [ activeStep , setActiveStep ] = React . useState ( 0 ) ;
99 const [ isLoading , setIsLoading ] = React . useState ( false ) ;
1010 const hasNextStep = React . useRef ( true ) ;
1111 const hasPreviousStep = React . useRef ( false ) ;
@@ -42,6 +42,7 @@ const Wizard: React.FC<WizardProps> = React.memo(
4242 goToNextStep ( ) ;
4343 } catch ( error ) {
4444 setIsLoading ( false ) ;
45+ throw error ;
4546 }
4647 } else {
4748 goToNextStep ( ) ;
You can’t perform that action at this time.
0 commit comments