You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we set in our form control for the control to not be required, then the bar rating component should not have a required:true error.
What is the current behavior?
When we do not add the required directive to the bar-rating, it still acts as required, because if the bar-rating value is 0, there is some logic in the component that sets the errors: { required: true }
What is the use-case or motivation for changing an existing behavior?
The component is always required and it should not be.
Which versions are you using for the following packages?
7.0.1
Angular:
ngx-bar-rating:
Is there anything else we should know?
I think it might be this validate() method? If the bar rating value is !0, then it will set required:true... But we should be able to have 0 as the rating is not required.
I also noticed that this.required would always evaluate to true as it's defined as a function rather than a simple boolean variable but I'll leave that with you :)
I am submitting a bug
What is the expected behavior?
When we set in our form control for the control to not be required, then the bar rating component should not have a required:true error.
What is the current behavior?
When we do not add the required directive to the bar-rating, it still acts as required, because if the bar-rating value is 0, there is some logic in the component that sets the errors: { required: true }
What are the steps to reproduce?
Link to stackblitz: https://stackblitz.com/edit/ngx-bar-rating-er6r7z?file=src%2Fmain.ts,src%2Findex.html
What is the use-case or motivation for changing an existing behavior?
The component is always required and it should not be.
Which versions are you using for the following packages?
7.0.1
Angular:
ngx-bar-rating:
Is there anything else we should know?
I think it might be this validate() method? If the bar rating value is !0, then it will set required:true... But we should be able to have 0 as the rating is not required.
The text was updated successfully, but these errors were encountered: