Questions tagged [mat-form-field]
For questions about the Angular Material <mat-form-field> wrapper component. When using this tag also include the more generic [angular-material] and [angular] tags where possible.
mat-form-field
122
questions
0
votes
0
answers
40
views
border is looking weard for my mat outlined fields in angular project
[screenshot](https://i.sstatic.net/YvQRcsx7.png)
my css is
@use '@angular/material' as mat;
@use "variables";
@include mat.core();
$axiom-primary: mat.define-palette(variables.$mat-color-...
0
votes
0
answers
17
views
user input fields inside angular table with "add button" and results in another input fields
I'm new to Angular and i'm trying to have a table with headers (name, first name, function...) with empty input fields under each header and and "Add" button : the user would write ...
2
votes
2
answers
74
views
How can I prevent autofill in form fields while developing an Angular project?
I'm currently developing a web application using Angular, and I've encountered an issue with autofill in form fields. Whenever I test my forms, especially in Chrome, the browser autofills some of the ...
0
votes
1
answer
158
views
Modifying Angular 16 mat-form-field styles
I am looking to change the default styling of Angular Material's MatFormField. I want to reduce the inner padding of the input field in a form field, and reduce the gap between each form field.
I am ...
0
votes
0
answers
202
views
Angular Material mat-form-field appearance="outline"
i use Material 16. I would like mat-form-field with appearance="outline" but the label should inside my InputField. CURRENTLY it looks like this
But i want this.
If i use <mat-form-...
0
votes
2
answers
248
views
Angular mat-form-field asks for "must contain a MatFormFieldControl", but it is a display-only text box
I am trying to put some messages into a text box, and want to utilize mat-form-field's versatility. The box is display only, which means it does not accept input. So I have:
<mat-form-field ...
1
vote
1
answer
65
views
Angular throws missing MatFormFieldControl error in mat-form-field when it's referenced by a template. Direct insert works fine
So this is the working code:
<mat-form-field *ngIf="asFormFieldWithLabel; else selector" style="width: 100%;">
<mat-label>{{asFormFieldWithLabel}}</mat-label>
...
0
votes
1
answer
32
views
How to prevent opening details when clicking on mat-label?
I have multiple details elements. When clicking on mat-label, details is opening, whether $event.stopPropagation() is used or not. I would like to prevent that behaviour because the user expects to ...
1
vote
1
answer
125
views
Cannot find control with name for last form control
I have a small project to display images on our nas.
I'm using angular 17.
On the main page I have 3 mat-form-fields. For some reason when I add the last of the tree mat-form-fields I get the error - ...
-1
votes
1
answer
337
views
Input element unable to set with default value in mat-form-field
I want my input element in the <mat-form-field> to have a default value, but it doesn't work! I tested the input without <mat-form-field> and it works correctly.
.html
<mat-form-field ...
0
votes
0
answers
96
views
I want to change the height of the mat-form-field in Angular 16
HTML
<mat-form-field appearance="fill" class="height-adjustment1">
<mat-label>Fill form field</mat-label>
<input matInput placeholder="Placeholder&...
0
votes
1
answer
264
views
Date input suffix not appearing inside a matFormField after Angular upgrade
I have an Input of type 'datetime-local' inside a matFormField, like this:
<mat-form-field>
<input
formControlName="dateTimeSelect"
matInput
...
0
votes
0
answers
62
views
How to remove gray margin of mat-form-field when it contains mat-select and sits in mat-tab
I am constructing a dropdown within a tab head, such as:
<mat-tab-group animationDuration="0ms" (selectedTabChange)="tabClick($event)">
<mat-tab *ngFor="let tab of ...
1
vote
1
answer
127
views
why do mat-form-field components flicker/temporarily disappear when I hover over a chrome browser tab?
Experienced in the latest versions of Angular 15 and Angular 16
Chrome browser Version 118.0.5993.89 (Official Build) (64-bit)
When I have my angular application open and I hover over a chrome browser ...
0
votes
0
answers
240
views
input rendering problem using mat form field from Angular Material
I am creating a login form for my application, and using the mat-form-field component for my inputs, but when I open the login page I notice that the input does not appear in the correct way, it ...