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

NgbRating - disabled state is broken in Template-driven forms #3465

Closed
ghost opened this issue Nov 14, 2019 · 2 comments · Fixed by #3574
Closed

NgbRating - disabled state is broken in Template-driven forms #3465

ghost opened this issue Nov 14, 2019 · 2 comments · Fixed by #3574

Comments

@ghost
Copy link

ghost commented Nov 14, 2019

Bug description:

Use NgModel and set "disabled" attribute on ngb-rating. Rating will not be shown.
Moreover, click on the disabled ngb-rating, and bound value will be set to 0.

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/angular-xwcmmq?file=app/rating-basic.html

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 8.2.4
ng-bootstrap: 5.1.4

@maxokorokov
Copy link
Member

@nseni, yikes, indeed. Disabled handling is completely broken with template-driven forms

Main reason:

Need to:

  • add tests for template-driven forms (now we have only for reactive)
  • ignore disabled state when writing value

@giaggianese
Copy link

Same issue income using reactive form.

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