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

I have a question about Mat-Select Angular

So I've Imported all necessary modules: import { MatSelectModule } from "@angular/material/select"; import { FormsModule, ReactiveFormsModule } from "@angular/forms"; import { MatFormFieldModule } from "@angular/material/form-field"; And Created…
0
votes
0 answers

How show to optional text in Mat Select in angular

I am using angular material design for my angular project. My question is how we can show optional text in mat select dropdowns [This is my dropdown image i have tried conditional span for extra text] (https://i.stack.imgur.com/gG7mx.png) [But the…
Dash_PSR
  • 1
  • 4
0
votes
0 answers

Get values of multiple mat-form-fields

I have the following code in .html: Min {{ number }} …
0
votes
2 answers

Hide option when aria-expand is false

I am trying to hide an option in mat-select only when aria-expanded is false.. I have an option for "Select All" and "Deselect All" My problem is, when closed, it shows "Deselect All" aria-expanded = true When closed: When aria-expanded = false Is…
Dennis
  • 31
  • 3
0
votes
0 answers

How to show required error on mat-select, on clicking next form

So i have a dropdown first. Then i have a input. When i select the input without selecting the first dropdown, i need to show validation for the first drop down. 1.First form:
0
votes
1 answer

Angular mat-select align center to the mat-table row column

I want to align the mat-select field at the center of a table row. I used the following CSS code for the column where 3 mat-select fields are added.
0
votes
0 answers
0
votes
1 answer

Start values selected in a mat-select from angular material

I have this select control in my form showing a list of years interface Opcion { value: string; } years: Opcion[] = []; now: Date = new Date(); actualYear: number = this.now.getFullYear(); yearsSelected: string[] = [(this.actualYear -…
kintela
  • 1,283
  • 1
  • 14
  • 32
0
votes
0 answers

Content Projection into MatSelect

I need to add functionlity to multible input elements one of which is my current cause for struggle, the MatSelect. For "normal" inputs and checkboxes the basic functionality I am going for was relatively easy to acchieve. I build an Component which…
0
votes
1 answer

How to select/deselect all options when I select 'All' option in Angular 12?

I have one array with the label 'All' like below. Created the mat-option based on the array. If I select 'All' means its needs to be selected for all other options. If I deselect the 'All' option means deselecting all options from the…
VelPaari
  • 11
  • 2
0
votes
0 answers

Only get data when click on mat-select

I used several dropdown lists on UI. If we load data on initial, it will impact to perfomance to load all of them. I want to only load data (from API) to mat-select after click or focus on them. I tried to use (click) or (focus) event but it didn't…
user3011414
  • 119
  • 1
  • 2
  • 10
0
votes
0 answers

In mat-table I have drop-down menu In that DropDown menu after select specific option than only that menu have to disabled for specific row

[Html File](https://i.stack.imgur.com/xhoxC.png) [Ts File](https://i.stack.imgur.com/2CAHX.png) Output of mat-table Here Selecting "Done" only I want Disabled Not For Other Options And Disabled will be only for that perticular row I tried with the…
0
votes
0 answers

In angular, when a page is opened in edit mode using query params, value in dropdown is not coming in mat select

customer_name is not displayed in dropdown. In .ts file, in ngOnInit() I have used query params to open a page in edit mode. ngOnInit(): void { this.addInvoiceItem(); this.route.queryParams.subscribe((params) => { if (params._id ===…
Saranya
  • 1
  • 1
0
votes
1 answer

Selected option is undefined - Angular material

I want to know from a list which options the user selected. In both ways the event/the object is undefined. What is the best way to do it? My first way:
0
votes
1 answer

Angular JS: Showing the mat-option values after clicking the mat-select

Good afternoon! These days i've been working on a pokemon-based project. My issue to solve right now is to be able to show the mat-options after clicking the its correspondant mat-select. Functions to get the trainer names array and the pokemons…