Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress bar with step not working dynamically #5585

Closed
filippocazzarolli opened this issue Jul 20, 2020 · 3 comments · Fixed by #5676
Closed

Progress bar with step not working dynamically #5585

filippocazzarolli opened this issue Jul 20, 2020 · 3 comments · Fixed by #5676

Comments

@filippocazzarolli
Copy link

Reproduction link

https://2vqekl.run.stackblitz.io

Steps to reproduce

Progress bar with step not working dynamically

What is expected?

bar not change

What is actually happening?

bar change color

Environment Info
ng-zorro-antd 9.3.0
Browser chrome 84
@wzhudev
Copy link
Member

wzhudev commented Aug 13, 2020

@filippocazzarolli Thanks for your feedback. Unfortunately we cannot open the reproduction link you provided. Could you please provide another one? Url should be like https://stackblitz.com/edit/xxxxxxx.

@zorro-bot
Copy link

zorro-bot bot commented Aug 13, 2020

Hello @filippocazzarolli. Please provide a online reproduction by forking this link https://stackblitz.com/edit/ng-zorro-antd-start or a minimal GitHub repository.
Issues labeled by Need Reproduce will be closed if no activities in 7 days.

你好 @filippocazzarolli, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 stackblitz 或者提供一个最小化的 GitHub 仓库
被标记为 Need Reproduce 的 issue 7 天内未跟进将会被自动关闭。

@filippocazzarolli
Copy link
Author

The progress bar with [nzStep] don't update state after change it.

Sorry i have trouble with stakblitz.... I followed you I pasted the code

import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: `
    <nz-progress [nzPercent]="percent"></nz-progress>
    <nz-progress [nzPercent]="percent" [nzSteps]="5"></nz-progress>
    <nz-button-group>
      <button nz-button (click)="decline()"><i nz-icon nzType="minus"></i></button>
      <button nz-button (click)="increase()"><i nz-icon nzType="plus"></i></button>
    </nz-button-group>
  `
})
export class AppComponent  {
  percent = 0;

  increase(): void {
    this.percent = this.percent + 10;
    if (this.percent > 100) {
      this.percent = 100;
    }
  }


  decline(): void {
    this.percent = this.percent - 10;
    if (this.percent < 0) {
      this.percent = 0;
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants