Reputation: 67
I have a list of sound, the requirement is relevant sound should play when the mouse hover on the sound name in the list.
<select class="cc-select-dropdown form-control" id="defaultMerge" formControlName="DefaultNotificationAlert">
<option *ngFor="let option of soundList" (mouseover)='playSound()' [ngValue]="option">{{option}}</option>
The problem is I couldn't find any event that works with the select options
Upvotes: 1
Views: 349
Reputation: 79
you can't do it in the <option>
of the <select>
tag. But you can do it with <mat-select>
, just use (mouseover)
in <mat-option>
.
Upvotes: 0
Reputation: 3898
you can't catch events like that in <option>
it's up to the browser. if you want you have to write a custom dropdown
yourself
Upvotes: 1