Skip to content

Commit

Permalink
refactor(kit): drop async pipe in tui-progress-circle (#9258)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Sep 30, 2024
1 parent eb5f8e4 commit 3c6e186
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {AsyncPipe} from '@angular/common';
import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';
import {toSignal} from '@angular/core/rxjs-interop';
import type {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core/types';
import {delay, of} from 'rxjs';

Expand All @@ -8,7 +8,6 @@ import {TUI_PROGRESS_OPTIONS} from '../progress.options';
@Component({
standalone: true,
selector: 'tui-progress-circle',
imports: [AsyncPipe],
templateUrl: './progress-circle.template.html',
styleUrls: ['./progress-circle.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand All @@ -21,7 +20,7 @@ import {TUI_PROGRESS_OPTIONS} from '../progress.options';
export class TuiProgressCircle {
private readonly options = inject(TUI_PROGRESS_OPTIONS);

protected readonly animationDelay$ = of(true).pipe(delay(0));
protected readonly animationDelay = toSignal(of(true).pipe(delay(0)));

@Input()
public value = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
cx="50%"
cy="50%"
class="t-progress"
[class.t-progress_filled]="animationDelay$ | async"
[class.t-progress_filled]="animationDelay()"
/>
</svg>

0 comments on commit 3c6e186

Please sign in to comment.