microsoft / microsoft/applicationinsights-angularplugin-js

[BUG] - Events are not tracked using Angular Material - Autocomplete & mat-option

Open
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
36
Forks
20
Avg merge
4d 18h
Merged PRs (30d)
7

Description

Description/Screenshot
I've got a couple of mat-option from Angular Material in a mat-autocomplete and would like to track when an event is selected. Unfortunately, this does not happen.
It works fine on other elements, like buttons.

Steps to Reproduce

<mat-autocomplete #auto="matAutocomplete">
  <mat-option *ngFor="let option of options" [value]="option" data-test-id="option">
    {{option}}
  </mat-option>
</mat-autocomplete>

Expected behavior
An event with name "option" is being tracked.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Angular Material mat-autocomplete and mat-option reproduction shown in the issue, then inspect how event tracking handles option selection compared with buttons. Confirm the fix by reproducing the example and verifying that selecting an option records an event named "option".

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.