Skip to content

Commit 23b8cd2

Browse files
committed
feat(stepper): add stepper skip callback
ref: MANAGER-10670 Signed-off-by: Quentin Pavy <[email protected]>
1 parent 55890e4 commit 23b8cd2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

packages/components/stepper/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ If you want to access the forms inside `on-finish` callback, you need to use the
6868
| `on-cancel` | function | &? | no | n/a | n/a | cancel step function
6969
| `on-focus` | function | & | no | n/a | n/a | focused step function
7070
| `on-submit` | function | & | no | n/a | n/a | submit step function
71+
| `on-skip` | function | &? | no | n/a | n/a | skip step function
7172

7273
### Attribute `valid`
7374

packages/components/stepper/src/js/step-form/step-form.component.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default {
2929
onCancel: '&?',
3030
onFocus: '&',
3131
onSubmit: '&',
32+
onSkip: '&?',
3233
},
3334
controller,
3435
template,

packages/components/stepper/src/js/step-form/step-form.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@
6363
ng-bind="::$ctrl.cancelText"
6464
ng-href="{{::$ctrl.cancelHref}}">
6565
</a>
66-
<oui-button class="oui-stepper__skippable-link" type="submit"
66+
<oui-button class="oui-stepper__skippable-link"
6767
variant="link"
6868
size="l"
69-
ng-if="$ctrl.skippable">
69+
ng-if="$ctrl.skippable"
70+
on-click="$ctrl.onSkip() || $ctrl.onFormSubmit(this[$ctrl.name])">
7071
{{::$ctrl.translations.skipThisStep}}
7172
</oui-button>
7273
</footer>

0 commit comments

Comments
 (0)