@@ -77,16 +77,20 @@ const WizardInternal = (props) => {
7777 { ( ) => (
7878 < React . Fragment >
7979 { currentStep . nextStep && (
80- < button disabled = { ! formOptions . getState ( ) . valid } onClick = { ( ) => handleNext ( selectNext ( currentStep . nextStep , formOptions . getState ) ) } >
80+ < button
81+ type = "button"
82+ disabled = { ! formOptions . getState ( ) . valid }
83+ onClick = { ( ) => handleNext ( selectNext ( currentStep . nextStep , formOptions . getState ) ) }
84+ >
8185 Next
8286 </ button >
8387 ) }
8488 { ! currentStep . nextStep && (
85- < button disabled = { ! formOptions . getState ( ) . valid } onClick = { ( ) => formOptions . handleSubmit ( ) } >
89+ < button type = "button" disabled = { ! formOptions . getState ( ) . valid } onClick = { ( ) => formOptions . handleSubmit ( ) } >
8690 Submit
8791 </ button >
8892 ) }
89- < button onClick = { handlePrev } disabled = { activeStepIndex === 0 } >
93+ < button type = "button" onClick = { handlePrev } disabled = { activeStepIndex === 0 } >
9094 Back
9195 </ button >
9296 </ React . Fragment >
@@ -98,6 +102,8 @@ const WizardInternal = (props) => {
98102
99103const WrappedWizard = ( props ) => < Wizard Wizard = { WizardInternal } { ...props } /> ;
100104
105+ const FormTemplateCb = ( props ) => < FormTemplate { ...props } showFormControls = { false } /> ;
106+
101107const CustomWizard = ( ) => {
102108 const [ values , setValues ] = useState ( ) ;
103109
@@ -106,7 +112,7 @@ const CustomWizard = () => {
106112 < FormRenderer
107113 schema = { schema }
108114 componentMapper = { { 'text-field' : TextField , select : Select , wizard : WrappedWizard } }
109- FormTemplate = { ( props ) => < FormTemplate { ... props } showFormControls = { false } /> }
115+ FormTemplate = { FormTemplateCb }
110116 onSubmit = { ( values ) => setValues ( values ) }
111117 />
112118 { values && < pre > { JSON . stringify ( values , null , 2 ) } </ pre > }
0 commit comments