@@ -77,16 +77,20 @@ const WizardInternal = (props) => {
77
77
{ ( ) => (
78
78
< React . Fragment >
79
79
{ 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
+ >
81
85
Next
82
86
</ button >
83
87
) }
84
88
{ ! currentStep . nextStep && (
85
- < button disabled = { ! formOptions . getState ( ) . valid } onClick = { ( ) => formOptions . handleSubmit ( ) } >
89
+ < button type = "button" disabled = { ! formOptions . getState ( ) . valid } onClick = { ( ) => formOptions . handleSubmit ( ) } >
86
90
Submit
87
91
</ button >
88
92
) }
89
- < button onClick = { handlePrev } disabled = { activeStepIndex === 0 } >
93
+ < button type = "button" onClick = { handlePrev } disabled = { activeStepIndex === 0 } >
90
94
Back
91
95
</ button >
92
96
</ React . Fragment >
@@ -98,6 +102,8 @@ const WizardInternal = (props) => {
98
102
99
103
const WrappedWizard = ( props ) => < Wizard Wizard = { WizardInternal } { ...props } /> ;
100
104
105
+ const FormTemplateCb = ( props ) => < FormTemplate { ...props } showFormControls = { false } /> ;
106
+
101
107
const CustomWizard = ( ) => {
102
108
const [ values , setValues ] = useState ( ) ;
103
109
@@ -106,7 +112,7 @@ const CustomWizard = () => {
106
112
< FormRenderer
107
113
schema = { schema }
108
114
componentMapper = { { 'text-field' : TextField , select : Select , wizard : WrappedWizard } }
109
- FormTemplate = { ( props ) => < FormTemplate { ... props } showFormControls = { false } /> }
115
+ FormTemplate = { FormTemplateCb }
110
116
onSubmit = { ( values ) => setValues ( values ) }
111
117
/>
112
118
{ values && < pre > { JSON . stringify ( values , null , 2 ) } </ pre > }
0 commit comments