Injecting callback for updating values in Stepper
This commit is contained in:
parent
c0a6c222dd
commit
f31976df87
|
@ -69,7 +69,11 @@ class GnoStepper extends React.PureComponent<Props, State> {
|
||||||
const activePageProps = this.getPageProps(pages)
|
const activePageProps = this.getPageProps(pages)
|
||||||
const { children, ...props } = activePageProps
|
const { children, ...props } = activePageProps
|
||||||
|
|
||||||
return children(props)
|
return children({ ...props, updateInitialProps: this.updateInitialProps })
|
||||||
|
}
|
||||||
|
|
||||||
|
updateInitialProps = (initialValues) => {
|
||||||
|
this.setState({ values: initialValues })
|
||||||
}
|
}
|
||||||
|
|
||||||
validate = (values: Object) => {
|
validate = (values: Object) => {
|
||||||
|
|
Loading…
Reference in New Issue