From 820a0394f78a224551c4ad20f1d8fc5bfd8a470a Mon Sep 17 00:00:00 2001 From: Laercio Santana Date: Tue, 21 Mar 2017 21:53:59 -0300 Subject: [PATCH] [rating-bar] changes on comments --- src/components/mdRatingBar/mdRatingBar.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/mdRatingBar/mdRatingBar.vue b/src/components/mdRatingBar/mdRatingBar.vue index d83fc48..0796347 100644 --- a/src/components/mdRatingBar/mdRatingBar.vue +++ b/src/components/mdRatingBar/mdRatingBar.vue @@ -78,12 +78,13 @@ this.$emit('change', selected / this.mdNumStars); } }, - getIconIndex(iconSelected) {//icon is a dom element + getIconIndex(iconSelected) {//iconSelected is a dom element let ratingIcons = this.$el.querySelectorAll('.md-back-stars > .md-icon, .md-front-stars > .md-icon'); let selected = -1; ratingIcons = Array.prototype.slice.call(ratingIcons); - ratingIcons.some((icon, i) => {//find index + //find index from iconSelected + ratingIcons.some((icon, i) => { if (icon === iconSelected) { selected = (i + 1) % this.mdNumStars; selected = !selected ? this.mdNumStars : selected;