Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toolbarExtraButtons Disabled #23

Open
fdubeetech opened this issue Sep 22, 2020 · 3 comments
Open

toolbarExtraButtons Disabled #23

fdubeetech opened this issue Sep 22, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@fdubeetech
Copy link

How coud I disable a ExtraButton ?

@abdulkadirgenc abdulkadirgenc added the enhancement New feature or request label Oct 19, 2020
@developer-kee
Copy link

ngWizardConfig: NgWizardConfig = {
toolbarSettings: {
showNextButton: false,
showPreviousButton: false
}
};

not sure if this is what you are looking for

@ikamugo
Copy link

ikamugo commented Nov 30, 2020

ngWizardConfig: NgWizardConfig = {
toolbarSettings: {
showNextButton: false,
showPreviousButton: false
}
};

not sure if this is what you are looking for

I think what he is asking is how to add disabled to the extra toolbar button. I am also looking for this.
toolbarExtraButtons: [
{ text: 'Finish', class: 'btn btn-info', event: () => { alert("Finished!!!"); } }
]

@ObadaSaada
Copy link

you can use nativeElement
inject ElementRef and Renderer2 to your constructor

constructor(
    private elem: ElementRef,
    private renderer: Renderer2
) {}

then select your button by CSS class name, and using renderer set the attribute name disabled and value disabled

    const nextbtn = this.elem.nativeElement.querySelectorAll('.ng-wizard-btn-next')[0];
    this.renderer.setAttribute(nextbtn, 'disabled', 'disbaled');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants