-
Notifications
You must be signed in to change notification settings - Fork 87
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
enhancement: need config parameter min-rating #22
Comments
Thanks for the feedback. I've given this a little thought and I'm not sure there is much of a use case for this because it can already be done with <star-rating v-model="rating"></star-rating> new Vue({
el: '#app',
data: {
rating: 1
}
}); Here's the JSFiddle: https://jsfiddle.net/k0x9ayws/ Once set to 1 there isn't any way to set it to 0 without writing that implementation yourself and I can't see anybody needing to set a |
I just created a zero rating in your fiddle example by clicking to the very leftmost part of the stars, which is exactly the issue I was addressing. |
Ah, OK. That shouldn't happen, it makes no sense to have to click a 1 pixel column to reset the value, I'll get that fixed. |
Fixed in version 1.5.0 |
As of now, even with a stepping of 1, it is possible to give a 0-stars rating. Most existing implementations require that the user can vote only between 1 and 5 stars.
It should be possible to configure a minimum rating value. Of course this can be done using the
rating-selected
event handler (like not applying the vote if the value is less than 1 or whatever the user wants as a minimum), but since this will be a standard requirement this should probably be implemented as a config optionmin-rating
.The text was updated successfully, but these errors were encountered: