File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
modules/wizard/components
screens/wizardExample/components Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -20,24 +20,31 @@ class WizardPageContainer extends React.Component {
2020 }
2121 }
2222
23- transitionStateMachine ( nextProps ) {
24- switch ( nextProps . wizard . currentState ) {
23+ transitionStateMachine ( {
24+ wizard,
25+ requiresInitialization,
26+ initialized,
27+ requiresValidation,
28+ canTransition,
29+ finishedDisposing
30+ } = { } ) {
31+ switch ( wizard . currentState ) {
2532 case wizardStates . INITIALIZING : {
26- if ( ! nextProps . requiresInitialization ) {
27- nextProps . initialized ( ) ;
33+ if ( ! requiresInitialization ) {
34+ initialized ( ) ;
2835 }
2936 break ;
3037 }
3138 case wizardStates . PAGE_INITIALIZED : {
32- if ( nextProps . requiresValidation ) {
33- nextProps . requiresValidation ( ) ;
39+ if ( requiresValidation ) {
40+ requiresValidation ( ) ;
3441 } else {
35- nextProps . canTransition ( ) ;
42+ canTransition ( ) ;
3643 }
3744 break ;
3845 }
3946 case wizardStates . DISPOSING : {
40- nextProps . finishedDisposing ( ) ;
47+ finishedDisposing ( ) ;
4148 break ;
4249 }
4350 default : {
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ class WizardExampleContainer extends Component {
2727 prevProps . wizard . currentState !== wizardStates . DISPOSING &&
2828 this . props . wizard . currentState === wizardStates . DISPOSING
2929 ) {
30- // This is where you can clean up call back references, release
31- // handles, etc...
30+ // This is where you can clean up call back references, release handles, etc...
3231 alert ( "Wizard is disposing, clean up here..." ) ;
3332 }
3433
You can’t perform that action at this time.
0 commit comments