fix(core): update
This commit is contained in:
parent
8d1451fffa
commit
1f3502685f
@ -15,6 +15,7 @@ export interface IStep {
|
||||
title: string;
|
||||
content: TemplateResult;
|
||||
validationFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>;
|
||||
onReturnToStepFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>;
|
||||
validationFuncCalled?: boolean;
|
||||
}
|
||||
|
||||
@ -209,9 +210,12 @@ export class DeesStepper extends DeesElement {
|
||||
this.scroller.to(scrollPosition);
|
||||
}
|
||||
|
||||
public goBack() {
|
||||
public async goBack() {
|
||||
const currentIndex = this.steps.findIndex(stepArg => stepArg === this.selectedStep);
|
||||
this.selectedStep = this.steps[currentIndex - 1];
|
||||
await this.domtoolsPromise;
|
||||
await this.domtools.convenience.smartdelay.delayFor(100);
|
||||
this.selectedStep.onReturnToStepFunc?.(this, this.shadowRoot.querySelector('.selected'));
|
||||
}
|
||||
|
||||
public goNext() {
|
||||
|
Loading…
Reference in New Issue
Block a user