fix(core): update
This commit is contained in:
		| @@ -15,6 +15,7 @@ export interface IStep { | |||||||
|   title: string; |   title: string; | ||||||
|   content: TemplateResult; |   content: TemplateResult; | ||||||
|   validationFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>; |   validationFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>; | ||||||
|  |   onReturnToStepFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>; | ||||||
|   validationFuncCalled?: boolean; |   validationFuncCalled?: boolean; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -209,9 +210,12 @@ export class DeesStepper extends DeesElement { | |||||||
|     this.scroller.to(scrollPosition); |     this.scroller.to(scrollPosition); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   public goBack() { |   public async goBack() { | ||||||
|     const currentIndex = this.steps.findIndex(stepArg => stepArg === this.selectedStep); |     const currentIndex = this.steps.findIndex(stepArg => stepArg === this.selectedStep); | ||||||
|     this.selectedStep = this.steps[currentIndex - 1]; |     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() { |   public goNext() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user