[rating-bar] adds hover event

This commit is contained in:
Laercio Santana 2017-05-28 15:54:28 -03:00
parent 3a0b90ae22
commit bbda58ba64
2 changed files with 6 additions and 0 deletions

View file

@ -88,6 +88,11 @@
<md-table-cell>Receive the new rating</md-table-cell>
<md-table-cell>Triggered when the rating changes his value by user interaction.</md-table-cell>
</md-table-row>
<md-table-row>
<md-table-cell>hover</md-table-cell>
<md-table-cell>Receive the pointer rating</md-table-cell>
<md-table-cell>Triggered when the user points over a new rating.</md-table-cell>
</md-table-row>
</md-table-body>
</md-table>
</api-table>

View file

@ -131,6 +131,7 @@
hoverStars(evt) {
if (!this.disabled) {
this.rating = this.getIconIndex(evt.currentTarget);
this.$emit('hover', this.rating);
}
},
clickStars(evt) {