Skip to content

Commit

Permalink
TextFieldExtended: ForceAutoSize (CodeBeamOrg#276)
Browse files Browse the repository at this point in the history
* TextFieldExtended ForceAutoSize

* Doc
  • Loading branch information
mckaragoz authored Sep 9, 2023
1 parent 66e04d3 commit 7fa296f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ protected async Task OnChangeHandler(ChangeEventArgs args)
}
}

public virtual async Task ForceAutoSize()
{
await JSRuntime.InvokeVoidAsync("auto_size", ElementReference);
}

/// <summary>
/// If true, automatically resize the height regard to the text. Needs Lines parameter to set more than 1.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public partial class MudTextFieldExtended<T> : MudDebouncedInputExtended<T>
/// </summary>
[Parameter] public bool AutoSize { get; set; }

public async Task ForceAutoSize()
{
await InputReference.ForceAutoSize();
}

/// <summary>
/// The render fragment for child content.
/// </summary>
Expand Down

0 comments on commit 7fa296f

Please sign in to comment.