Prevent mat-autocomplete from triggering double change detection on keydown

46 Views Asked by At

I am experiencing some performance issues on text input when using mat-autocomplete. Picture one shows the event call tree for a normal input field and picture two shows for a mat-autocomplete field. As seen, the whole change detection sequence is happening double - both for key down and key press when using mat-autocomplete. Is there any way to prevent this from happening? I dont need the autocomplete functionality so I have that set to disabled. I just need an input field with the possibility of selecting predefined options.

Normal input field mat-autocomplete field

I tried using the stopPropagation and stopImmediatePropagation, but does not seem to work.

0

There are 0 best solutions below