Questions tagged [mat-select]

For questions about the form control element for Angular Material. When using this tag also include the more generic [angular-material] and [angular] tags where possible.

154 questions
0
votes
0 answers

How to click on mat-select-trigger when mat-select dropdown panel is open?

{{ placeholder }} {{ placeholder ? ' - ' : '' }}{{ getList() }} {{getCountOfItems()}} I…
0
votes
1 answer

how to set a value by default inside a mat select in Angular?

I have a screen with Angular, it is a table that shows data from DB through a rest api in Java, the esValido field only brings values ​​1 and 0 as shown in the first image. What I want to do is place a mat-select in the esValido field, and show the…
0
votes
2 answers

How to hide selected option from options list while using mat-select

I am using newest version mat-select v 16. When a particular option is selected and we click the select drop-down the selected option shouldn't show in options list. This is what I am using in html.
Saran S
  • 39
  • 1
  • 6
0
votes
1 answer

Lost of data in Angular form when change the collection of data

i'm stuck in a weird problem: the "aggiungi gruppo" button add an element in the array which is the one that it's been cycled by the *ngFor attached to the element. the problem is that if I include all the html inside a Form every time that i add…
Lorenzo
  • 673
  • 1
  • 11
  • 25
0
votes
0 answers

how can I stop weird scrolling jump behavior with multiple mat-select checkbox clicks?

I have a material multi-select and noticed that if I have content before my mat-option tags, then clicking on them causes the scroll bar to jump to odd places causing incredibly confusing behavior... I have replicated the issue with stackblitz and…
patrick
  • 9,290
  • 13
  • 61
  • 112
0
votes
1 answer

How can i expand mat-select with custom action?

I have to implement a new function in mat-select next to the arrow, but i always messed up the html/scss and this new icon get covered by chips items. I attached a picture how this should looks like. mat-select my mat-select
qwerty
  • 3
  • 1
0
votes
0 answers

Angular 14 default value for mat-select doesn't work

In this code if I click on edit button the selection menu appears with default value of column.field as set in [formControlName] with name Material Name.The code was working properly in angular 13 but after migrating to angular 14, by clicking on…
0
votes
2 answers

Apply two different classes with panel class depending on the condition in Angular material

I am using mat-select of Angular material. It has panelclass property that can be used to apply class. In parent component I have to style the drop down. The issue is :- I have to apply dynamic class to panelclass but type of panel class is…
Apurva Pathak
  • 692
  • 1
  • 9
  • 22
0
votes
1 answer

Angular Select not showing text when the combination of *ngFor and *ngIf is used

I have a form with 4 select inputs. When one value is selected it should not be shown in other select inputs. I have created a working solution. But when an option is selected it is not shown in the select text, it stays empty. it occurs when a…
0
votes
0 answers

mat-select disabled attribute doesn't work in the legacy angular-material?

We have upgraded to Angular V15 but are still using the legacy Angular-Material component. What I've noticed is that the disabled attribute in the mat-select is not working anymore.
0
votes
0 answers

Display the name instead of value in mat-select AutoComplete

`I want to display the name (employee Name) instead of value (employee id), while trying to pick an employee by name in the drop down. Sample Data: 0: {employeeID: 13, employeeName: 'vinayakar G'} 1: {employeeID: 14, employeeName: 'kanna V'} Any…
0
votes
0 answers

How to select all the options in mat-select by default

I want to select all the options by default in mat-select Here is my code: Questions ({{questionSelected}} of {{structureViewObj.records[0].questions.length}})
0
votes
0 answers

How to enable input fields depending on mat-select options>?

Inside a mat-tab I have a form which contains a mat-select with the following code: Database
Ionut
  • 724
  • 2
  • 9
  • 25
0
votes
0 answers

Parser Error: Unexpected token [, expected identifier or keyword at column 14 in [ {{types.value?.[0] || ''}} ]

I want to add a mat-select control with multiple option with mat-select-trigger. My html code:
Ionut
  • 724
  • 2
  • 9
  • 25
0
votes
0 answers

Angular: add search functionality to dynamically created mat select dropdowns

I am working on an Angular project where I'm rendering dynamic mat-select dropdowns (returned by query). Below is the code to render these mat-selects. HTML: -
Sunil Bamal
  • 87
  • 1
  • 14