ng-wizard icon indicating copy to clipboard operation
ng-wizard copied to clipboard

toolbarExtraButtons Disabled

Open fdubeetech opened this issue 4 years ago • 3 comments

How coud I disable a ExtraButton ?

fdubeetech avatar Sep 22 '20 18:09 fdubeetech

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

not sure if this is what you are looking for

developer-kee avatar Oct 21 '20 18:10 developer-kee

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!!!"); } } ]

ikamugo avatar Nov 30 '20 21:11 ikamugo

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');

ObadaSaada avatar Feb 08 '21 12:02 ObadaSaada