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

Type error when setting max-rating dynamically depending on hover. #68

Open
yung-madam opened this issue Nov 18, 2020 · 0 comments
Open

Comments

@yung-madam
Copy link

yung-madam commented Nov 18, 2020

Hey there, when max-rating prop is set to a dynamically generated number I'm getting

Vue warn]: Invalid prop: type check failed for prop "activeColor". Expected String with value "undefined", got Undefined

The component is set up like this:

<div v-else :title="ratingTitle" class="rating" @mouseover="assetHover = true" @mouseleave="assetHover = false" > <StarRating :read-only="readonly" :increment="1" :max-rating="assetHover ? 5 : 1" :show-rating="false" :rating="myRating()" :star-size="svgWidth" :active-color="'#ffa306'" :border-color="'#ffa306'" :padding="4" @rating-selected="rate" /> <span v-if="withText && !rating" class="rating__button--text" >Rate it</span > <span v-if="withText && rating" class="rating__button--text" >Your rating: <strong>{{ rating.rating }}</strong></span > </div>

Any way how to fix this from my side or is this a bug on ur side?
Thx and sorry if I've missed this thing being reported already.

star rating 1.6.1
vue 2.6.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant