MatBlazor icon indicating copy to clipboard operation
MatBlazor copied to clipboard

MatTextField adjust rows when is a TextArea

Open KernowCode opened this issue 5 years ago • 3 comments

Hi is there a way to set the 'rows' property of a text area in the MatTextField?

KernowCode avatar Feb 12 '20 19:02 KernowCode

no, according to code

americanslon avatar Feb 14 '20 04:02 americanslon

The best would be to auto-adjust the height.

kristof12345 avatar Jun 22 '20 14:06 kristof12345

I got this to work using the Attributes property i.e.

<MatTextField TextArea="true" @bind-Value="Text" TValue="string"
    Attributes="@(new Dictionary<string, object>{ ["rows"] = 7 })" />

Tbh though I expected this to be on the InputAttributes property, but it's through the Attributes property source line here

mlienau avatar Feb 08 '22 19:02 mlienau