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
Better handling for progress bar with max=0 #3386
Comments
Well, from what I see |
The real question is what value should be displayed in this case. |
I don't think it should fail with an error, it should just render the component correctly. What's wrong with having This issue from my point of view is that: [value]="10" [max]="0" [showValue]="true"
Let's discuss changing default behaviour in #3390 |
Also should update the docs, saying that max SHOULD be a positive value |
Ok, on reflection and playing with standard Left a comment in the review: #3400 (review) |
Bug description:
Currently progress bar with the max value of 0 fills for the width necessary for the label to display. This is not consistent behavior and it will be better to make max=0 a special case and always fill either 0% or 100%.
I think 100% will be a more sensible behavior because of cases like value=42 and max=0. In this case progress bar will trim value to 0, but 100% will make some sense in this situation unlike 0%.
Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-mc1mw9
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 8.2.0
ng-bootstrap: 5.1.0
Bootstrap: 4.3.1
The text was updated successfully, but these errors were encountered: