Hide selected mark in mat-select

Asked on May 15, 2024
I am using Angular Material mat-select. In single selection, a checkmark shows the currently selected value. How to disable it?

<mat-select [formControl]="city">
  <mat-option value="Item1">City A</mat-option>
  <mat-option value="Item2">City B</mat-option>
  <mat-option value="Item3">City C</mat-option>

If I select 'City B', a checkmark is applied on that option. I want to disable it.

Replied on May 15, 2024
Use hideSingleSelectionIndicator attribute of <mat-select>.

<mat-select [formControl]="city" hideSingleSelectionIndicator>

hideSingleSelectionIndicator : Boolean property to hide checkmark indicator.


Write Answer

©2024 concretepage.com | Privacy Policy | Contact Us