Skip to content

Commit 7fa296f

Browse files
authored
TextFieldExtended: ForceAutoSize (#276)
* TextFieldExtended ForceAutoSize * Doc
1 parent 66e04d3 commit 7fa296f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CodeBeam.MudBlazor.Extensions/Components/InputExtended/MudInputExtended.razor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ protected async Task OnChangeHandler(ChangeEventArgs args)
102102
}
103103
}
104104

105+
public virtual async Task ForceAutoSize()
106+
{
107+
await JSRuntime.InvokeVoidAsync("auto_size", ElementReference);
108+
}
109+
105110
/// <summary>
106111
/// If true, automatically resize the height regard to the text. Needs Lines parameter to set more than 1.
107112
/// </summary>

CodeBeam.MudBlazor.Extensions/Components/TextFieldExtended/MudTextFieldExtended.razor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public partial class MudTextFieldExtended<T> : MudDebouncedInputExtended<T>
2525
/// </summary>
2626
[Parameter] public bool AutoSize { get; set; }
2727

28+
public async Task ForceAutoSize()
29+
{
30+
await InputReference.ForceAutoSize();
31+
}
32+
2833
/// <summary>
2934
/// The render fragment for child content.
3035
/// </summary>

0 commit comments

Comments
 (0)