Skip to content

Commit bbda58b

Browse files
[rating-bar] adds hover event
1 parent 3a0b90a commit bbda58b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/src/pages/components/RatingBar.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@
8888
<md-table-cell>Receive the new rating</md-table-cell>
8989
<md-table-cell>Triggered when the rating changes his value by user interaction.</md-table-cell>
9090
</md-table-row>
91+
<md-table-row>
92+
<md-table-cell>hover</md-table-cell>
93+
<md-table-cell>Receive the pointer rating</md-table-cell>
94+
<md-table-cell>Triggered when the user points over a new rating.</md-table-cell>
95+
</md-table-row>
9196
</md-table-body>
9297
</md-table>
9398
</api-table>

src/components/mdRatingBar/mdRatingBar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
hoverStars(evt) {
132132
if (!this.disabled) {
133133
this.rating = this.getIconIndex(evt.currentTarget);
134+
this.$emit('hover', this.rating);
134135
}
135136
},
136137
clickStars(evt) {

0 commit comments

Comments
 (0)