Skip to content

Commit a50b9be

Browse files
jeff-phillips-18cdcabrera
authored andcommitted
fix(wizard): update wizard on parameter changes (#687)
Change appropriate parameters to one-way bindings.
1 parent 69148ef commit a50b9be

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

src/wizard/examples/wizard.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</file>
5454
<file name="wizard-container.html">
5555
<pf-wizard wizard-title="Wizard Title"
56-
wizard-ready="deployProviderReady"
56+
wizard-ready="wizardReady"
5757
on-finish="finishedWizard()"
5858
on-cancel="cancelDeploymentWizard()"
5959
next-title="nextButtonTitle"
@@ -199,9 +199,12 @@
199199
ipsum: ''
200200
};
201201
$scope.secondaryLoadInformation = 'ipsum dolor sit amet, porta at suspendisse ac, ut wisi vivamus, lorem sociosqu eget nunc amet.';
202+
203+
$scope.wizardReady = false;
202204
$timeout(function () {
203-
$scope.deployReady = true;
205+
$scope.wizardReady = true;
204206
}, 1000);
207+
205208
$scope.nextButtonTitle = "Next >";
206209
};
207210

src/wizard/wizard.component.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ angular.module('patternfly.wizard').component('pfWizard', {
33
bindings: {
44
title: '@',
55
wizardTitle: '@',
6-
hideIndicators: '=?',
6+
hideIndicators: '<?',
77
activeStepTitleOnly: '<?',
88
hideSidebar: '@',
99
hideHeader: '@',
1010
hideBackButton: '@',
1111
sidebarClass: '@',
1212
stepClass: '@',
13-
contentHeight: '=?',
13+
contentHeight: '<?',
1414
currentStep: '<?',
15-
cancelTitle: '=?',
16-
backTitle: '=?',
17-
nextTitle: '=?',
18-
backCallback: '=?',
19-
nextCallback: '=?',
15+
cancelTitle: '<?',
16+
backTitle: '<?',
17+
nextTitle: '<?',
18+
backCallback: '<?',
19+
nextCallback: '<?',
2020
onFinish: '&',
2121
onCancel: '&',
22-
wizardReady: '=?',
23-
wizardDone: '=?',
24-
loadingWizardTitle: '=?',
25-
loadingSecondaryInformation: '=?',
26-
embedInPage: '=?',
22+
wizardReady: '<?',
23+
wizardDone: '<?',
24+
loadingWizardTitle: '<?',
25+
loadingSecondaryInformation: '<?',
26+
embedInPage: '<?',
2727
onStepChanged: '&?'
2828
},
2929
templateUrl: 'wizard/wizard.html',
@@ -208,13 +208,15 @@ angular.module('patternfly.wizard').component('pfWizard', {
208208
ctrl.allowStepIndicatorClick = function (step) {
209209
return step.allowClickNav &&
210210
!ctrl.wizardDone &&
211+
ctrl.selectedStep &&
211212
ctrl.selectedStep.okToNavAway &&
212213
(ctrl.selectedStep.nextEnabled || (step.stepPriority < ctrl.selectedStep.stepPriority)) &&
213214
(ctrl.selectedStep.prevEnabled || (step.stepPriority > ctrl.selectedStep.stepPriority));
214215
};
215216

216217
ctrl.stepClick = function (step) {
217218
if (step.allowClickNav &&
219+
ctrl.selectedStep &&
218220
!ctrl.wizardDone &&
219221
ctrl.selectedStep.okToNavAway &&
220222
(ctrl.selectedStep.nextEnabled || (step.stepPriority < ctrl.selectedStep.stepPriority)) &&

0 commit comments

Comments
 (0)