michaeldoye / mat-progress-buttons

Very simple Angular6+ Material Design progress buttons
https://mat-progress-buttons.firebaseapp.com/
MIT License
110 stars 54 forks source link

Spinner doen't show when you set the active property in code. #91

Open Warwizza opened 3 years ago

Warwizza commented 3 years ago

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Windows 10.

Versions

Angular 12.2.9 mat-progress-buttons 9.3.1

Repro steps

Open this Stackblitz and click the button.

Changes I made to your demo stackblitz:

  1. Updated the mat-progress-buttons to version 9.3.1.
  2. Replaced the demo code with your example code found here.
  3. updated the app.module so it will call the forRoot().
  4. Click the button in the output. This is not spinning.

Desired functionality

The button spinning when setting the active property in code.

Mention any other details that might be useful

This broke in v9.3.1.

90 might be related

bartez commented 2 years ago

I have the same issue in my projects. Workaround is downgrade to version 9.1.1.

CelestialMusa commented 2 years ago

Also on Angular 12, tried downgrading to v9.1.1, spinner is still not showing.

jorgeluis1706 commented 2 years ago

Also on Angular 12, tried downgrading to v9.1.1, spinner is still not showing.

do npm uninstall mat-progress-buttons and later npm install mat-progress-buttons@9.1.1, that worked for me.

izzmeifter commented 2 years ago

On Angular 12+

Instead of mutating the object directly like

btnOpts.active = true

try using a spread operator like

btnOpts = { ...this.btnOpts, active: true };

Worked for us. Cheers

experimint commented 2 years ago

Downgrade to 9.2.1 works for me