revert stepper component changes to fix safe creation test

This commit is contained in:
Mikhail Mikheev 2019-06-26 15:41:46 +04:00
parent 1d040f87ce
commit f8e9b4dfb3
1 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ class GnoStepper extends React.PureComponent<Props, State> {
this.state = { this.state = {
page: 0, page: 0,
values: {}, values: props.initialValues || {},
} }
} }
@ -146,7 +146,7 @@ class GnoStepper extends React.PureComponent<Props, State> {
render() { render() {
const { const {
steps, children, classes, disabledWhenValidating = false, testId, initialValues, steps, children, classes, disabledWhenValidating = false, testId,
} = this.props } = this.props
const { page, values } = this.state const { page, values } = this.state
const activePage = this.getActivePageFrom(children) const activePage = this.getActivePageFrom(children)
@ -155,7 +155,7 @@ class GnoStepper extends React.PureComponent<Props, State> {
return ( return (
<React.Fragment> <React.Fragment>
<GnoForm onSubmit={this.handleSubmit} initialValues={values || initialValues} validation={this.validate} testId={testId}> <GnoForm onSubmit={this.handleSubmit} initialValues={values} validation={this.validate} testId={testId}>
{(submitting: boolean, validating: boolean, ...rest: any) => { {(submitting: boolean, validating: boolean, ...rest: any) => {
const disabled = disabledWhenValidating ? submitting || validating : submitting const disabled = disabledWhenValidating ? submitting || validating : submitting
const controls = ( const controls = (