Class MudInput<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
public class MudInput<T> : MudBaseInput<T>, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IFormComponent, IDisposable, IAsyncDisposable
Type Parameters
T
- Inheritance
-
MudBaseInput<T>MudInput<T>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
MudInput()
public MudInput()
Properties
AdornmentClassname
protected string AdornmentClassname { get; }
Property Value
AutoGrow
If true the input element will grow automatically with the text.
[Parameter]
public bool AutoGrow { get; set; }
Property Value
ChildContent
ChildContent of the MudInput will only be displayed if InputType.Hidden and if its not null.
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Classname
protected string Classname { get; }
Property Value
ClearButtonClassname
protected string ClearButtonClassname { get; }
Property Value
ClearIcon
Custom clear icon when Clearable is enabled.
[Parameter]
public string ClearIcon { get; set; }
Property Value
Clearable
Show clear button.
[Parameter]
public bool Clearable { get; set; }
Property Value
ElementReference
public ElementReference ElementReference { get; }
Property Value
HideSpinButtons
Hides the spin buttons for MudNumericField<T>
[Parameter]
public bool HideSpinButtons { get; set; }
Property Value
InputClassname
protected string InputClassname { get; }
Property Value
InputType
Type of the input element. It should be a valid HTML5 input type.
[Parameter]
public InputType InputType { get; set; }
Property Value
InputTypeString
protected string InputTypeString { get; }
Property Value
MaxLines
If AutoGrow is set to true, the input element will not grow bigger than MaxLines lines. If MaxLines is set to 0 or less, the property will be ignored.
[Parameter]
public int MaxLines { get; set; }
Property Value
NumericDownIcon
Custom numeric down icon.
[Parameter]
public string NumericDownIcon { get; set; }
Property Value
NumericUpIcon
Custom numeric up icon.
[Parameter]
public string NumericUpIcon { get; set; }
Property Value
OnClearButtonClick
Button click event for clear button. Called after text and value has been cleared.
[Parameter]
public EventCallback<MouseEventArgs> OnClearButtonClick { get; set; }
Property Value
OnDecrement
Invokes the callback when the Down arrow button is clicked when the input is set to Number. Note: use the optimized control MudNumericField<T> if you need to deal with numbers.
[Parameter]
public EventCallback OnDecrement { get; set; }
Property Value
OnIncrement
Invokes the callback when the Up arrow button is clicked when the input is set to Number. Note: use the optimized control MudNumericField<T> if you need to deal with numbers.
[Parameter]
public EventCallback OnIncrement { get; set; }
Property Value
OnMouseWheel
Mouse wheel event for input.
[Parameter]
public EventCallback<WheelEventArgs> OnMouseWheel { get; set; }
Property Value
Methods
BlurAsync()
public override ValueTask BlurAsync()
Returns
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
ClearButtonClickHandlerAsync(MouseEventArgs)
protected virtual Task ClearButtonClickHandlerAsync(MouseEventArgs e)
Parameters
Returns
DisposeAsync()
public ValueTask DisposeAsync()
Returns
FocusAsync()
public override ValueTask FocusAsync()
Returns
OnAfterRenderAsync(bool)
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
bool
Returns
OnChange(ChangeEventArgs)
protected Task OnChange(ChangeEventArgs args)
Parameters
args
ChangeEventArgs
Returns
OnInput(ChangeEventArgs)
protected Task OnInput(ChangeEventArgs args)
Parameters
args
ChangeEventArgs
Returns
OnPaste(ClipboardEventArgs)
Paste hook for descendants.
protected virtual Task OnPaste(ClipboardEventArgs args)
Parameters
args
ClipboardEventArgs
Returns
SelectAsync()
public override ValueTask SelectAsync()
Returns
SelectRangeAsync(int, int)
public override ValueTask SelectRangeAsync(int pos1, int pos2)
Parameters
Returns
SetParametersAsync(ParameterView)
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
ParameterView
Returns
SetText(string)
Sets the input text from outside programmatically
public Task SetText(string text)
Parameters
text
string