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 not showing #29

Closed brycekmartin closed 5 years ago

brycekmartin commented 5 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 7

Versions

Angular CLI: 7.3.6 Node: 8.9.1 OS: win32 x64 Angular: 7.2.10 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, platform-server, router

Package Version

@angular-devkit/architect 0.13.6 @angular-devkit/build-angular 0.13.6 @angular-devkit/build-optimizer 0.13.6 @angular-devkit/build-webpack 0.13.6 @angular-devkit/core 7.3.9 @angular-devkit/schematics 0.8.2 @angular/cdk 7.3.5 @angular/cli 7.3.6 @angular/flex-layout 7.0.0-beta.24 @angular/material 7.3.5 @ngtools/webpack 7.3.6 @schematics/angular 7.3.6 @schematics/update 0.13.6 rxjs 6.4.0 typescript 3.2.4 webpack 4.29.0

Repro steps

Here is my MatProgressButton code.... validateSpinner: MatProgressButtonOptions = { active: false, text: 'Validate', type: 'button', spinnerSize: 18, raised: true, stroked: false, buttonColor: 'accent', spinnerColor: 'primary', fullWidth: false, disabled: false, mode: 'indeterminate' };

Desired functionality

I have the button inside a mat-grid-tile, which is in a form. For some reason when I click the button the spinner does not show up. There is something that happens but I have not yet been able to figure out what CSS is wrong that it won't display the spinner. It exists in the DOM, but the button text never fades and the spinner never shows up.

brycekmartin commented 5 years ago

Nevermind... I was dumb. I set it to false outside of my subscription to the service I was calling instead of inside of the .subscribe function. This is working perfectly. Thank you!