web/elements: fix missing click handler on wizard close button

closes #2931
This commit is contained in:
Jens Langhammer 2022-05-23 09:33:16 +00:00
parent fdc09c658a
commit 6bab3bf68e

View file

@ -63,6 +63,13 @@ export class Wizard extends ModalButton {
class="pf-c-button pf-m-plain pf-c-wizard__close"
type="button"
aria-label="${t`Close`}"
@click=${() => {
this.open = false;
const firstPage = this.querySelector<WizardPage>(`[slot=${this.steps[0]}]`);
if (firstPage) {
this.currentStep = firstPage;
}
}}
>
<i class="fas fa-times" aria-hidden="true"></i>
</button>