Skip to content

Commit

Permalink
fix: loading button group
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-mladenov committed Feb 9, 2024
1 parent d1270f4 commit 2fb4930
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion projects/angular/src/button/button-group/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ export class ClrButton implements LoadingListener {
}

loadingStateChange(state: ClrLoadingState): void {
console.log(state);
this.loading = state === ClrLoadingState.LOADING;
}

Expand Down
8 changes: 4 additions & 4 deletions projects/angular/src/button/button-loading/loading-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ const MIN_BUTTON_WIDTH = 42;
selector: 'button[clrLoading]',
template: `
<span @parent [ngSwitch]="state">
<span *ngSwitchCase="buttonState.LOADING">
<ng-container *ngSwitchCase="buttonState.LOADING">
<span @spinner class="spinner spinner-inline"></span>
</span>
<span *ngSwitchCase="buttonState.SUCCESS">
</ng-container>
<ng-container *ngSwitchCase="buttonState.SUCCESS">
<span
@validated
(@validated.done)="this.loadingStateChange(this.buttonState.DEFAULT)"
class="spinner spinner-inline spinner-check"
></span>
</span>
</ng-container>
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton class="clr-loading-btn-content">
<ng-content></ng-content>
</span>
Expand Down

0 comments on commit 2fb4930

Please sign in to comment.