1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

mat-autocomplete optionSelected does not get triggered by mouse event

Discussão em 'Angular' iniciado por Chelsea Ma, Setembro 27, 2024 às 15:33.

  1. Chelsea Ma

    Chelsea Ma Guest

    I am using mat-autocomplete and input form control inside a custom cell editor for ag grid in angular.

    mat-autocomplete only reacts to keyboard event but not mouse event. Does anyone know how to fix this?

    <input matInput [matAutocomplete]="auto" [formControl]="control"/>
    <mat-autocomplete #auto="matAutocomplete" (optionSelected)="onOptionSelected($event)">
    <mat-option *ngFor="let option of options" [value]="option">
    {{ option }}
    </mat-option>
    </mat-autocomplete>


    I've tried optionSelected in mat-autocomplete, onSelectionChange in mat-option, click in mat-option

    Continue reading...

Compartilhe esta Página