Weird behavior of kendoRating

2 Answers 57 Views
Rating
Boris
Top achievements
Rank 1
Iron
Boris asked on 12 Jun 2023, 12:01 PM

Hello everyone,

pretty strange: when I initialize a kendoRating-Widget with {min:1 , max:5} I get five stars, when I initialize with a minimum of 0 instead, I get *six* stars. This does not make any sense to me....

Any thoughts?

 

2 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 14 Jun 2023, 10:04 PM

Hello Boris,

The min property represents the value from which the Rating items will be rendered. If you set it to 0 the first star value will be 0, the second 1, and so on up until the max value of 5 and so you will have 6 stars in total.

When, however, the min is 1 the first value star is one, and then the second is 2 and so and the 5th will be the max of 5. 

I hope this clarifies the situation.

Regards,
Nikolay
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.
Boris
Top achievements
Rank 1
Iron
commented on 10 Jul 2023, 10:56 AM

Hello Nikolay,

in that case: How can I create a rating widget with 5 stars accepting values from 0 to 5?

Thanks in advance,

Boris

Nikolay
Telerik team
commented on 13 Jul 2023, 07:01 AM

Hi Boris,

You can still create a Ratign with min: 1 and max 5 which will render 5 stars - the first will represent value 1, the second value 2, and so on. If no value is selected, however, the value of the Rating will be null. 

Dojo demo: https://dojo.telerik.com/IgONAXer

Regrads,

Nikolay

Boris
Top achievements
Rank 1
Iron
commented on 13 Jul 2023, 08:06 PM

The point is, even with setting a value of 0 is represented as a half star. A value of zero is not possible.
0
Boris
Top achievements
Rank 1
Iron
answered on 11 Jul 2023, 10:21 AM
BTW, the widget will not display properly when initialized while invisible and made visible afterwards.
Nikolay
Telerik team
commented on 13 Jul 2023, 07:02 AM

Hi Boris,

Can you please share a Dojo demo representing the problem?

Regards,

Nikolay

Tags
Rating
Asked by
Boris
Top achievements
Rank 1
Iron
Answers by
Nikolay
Telerik team
Boris
Top achievements
Rank 1
Iron
Share this question
or