riteshgandhi / ng-star-rating

Highly Customizable and Responsive Star Rating library built using Angular
MIT License
38 stars 10 forks source link

Component does not display new value after update if read-only #38

Open Gaetitan opened 4 years ago

Gaetitan commented 4 years ago

Bug After updating the value of the <star-rating> component, if readonly is set to true , the template does not display the new number of stars.

Description

Expected behavior The number of stars should be updated when the value of the component is updated.

Electric-impala commented 3 years ago

Bug After updating the value of the <star-rating> component, if readonly is set to true , the template does not display the new number of stars.

Description

  • Component <star-rating [value]="myValue" [totalstars]="5" checkedcolor="#FF9800" uncheckedcolor="black" size="30px" readonly="true"></star-rating> image
  • Update myValue is updated to a new value.
  • Result Value of <star-rating> is updated but the rendering is not updated. image

Expected behavior The number of stars should be updated when the value of the component is updated.

I have also encountered same issue did you got any fix for this

Electric-impala commented 3 years ago

if i set read only to true only shows empty stars

Gaetitan commented 3 years ago

Hi @Electric-impala, Unfortunately, I did not find any fix for that.

samhrncir commented 3 years ago

I am experiencing this same bug with the use case of binding to the value property and where readonly is true.

Electric-impala commented 3 years ago

Hi @samhrncir please follow the syntax mentioned below vairables may change <star-rating value="{{accommodation.stars}}" totalstars={{totalStar}} checkedcolor="#AD9865" uncheckedcolor="grey" size="18px" [readonly]="true">

CarlosMarangoni commented 2 years ago

same bug here, I can't fix it