I need to change the font color of a disabled input. When it is disabled, it appears gray and I want it to be black instead. I attempted to use readonly but that did not have the desired effect, and now the input is showing [object Object]. Below is my HTML and TS code. Any ideas on what could be causing this issue?
Here is the HTML code:
<mat-form-field appearance="outline" fxFlex="50" class="pr-4">
<mat-label>Producer</mat-label>
<input matInput formControlName="Producer" readonly="readonly">
<mat-icon matSuffix class="disabled-text">short_text</mat-icon>
<mat-error>Producer is Mandatory!</mat-error>
</mat-form-field>
And here is the TS code:
Producer: new FormControl(
{
value:
this.order.ProducerSellerCode +
"-" +
this.order.ProducerSellerName,
readonly: true,
},
[Validators.required]
),