Class MudNumericField<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
public class MudNumericField<T> : MudDebouncedInput<T>, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IFormComponent, IDisposable
Type Parameters
T
- Inheritance
-
MudBaseInput<T>MudNumericField<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
MudNumericField()
public MudNumericField()
Properties
Classname
protected string Classname { get; }
Property Value
ClearIcon
Custom clear icon when Clearable is enabled.
[Parameter]
[Category("Appearance")]
public string ClearIcon { get; set; }
Property Value
Clearable
Show clear button.
[Parameter]
[Category("Behavior")]
public bool Clearable { get; set; }
Property Value
HideSpinButtons
Hides the spin buttons, the user can still change value with keyboard arrows and manual update.
[Parameter]
[Category("Appearance")]
public bool HideSpinButtons { get; set; }
Property Value
InputMode
Hints at the type of data that might be entered by the user while editing the input. Defaults to numeric
[Parameter]
public override InputMode InputMode { get; set; }
Property Value
InvertMouseWheel
Reverts mouse wheel up and down events, if true.
[Parameter]
[Category("Behavior")]
public bool InvertMouseWheel { get; set; }
Property Value
Max
The maximum value for the input.
[Parameter]
[Category("Validation")]
public T Max { get; set; }
Property Value
- T
Min
The minimum value for the input.
[Parameter]
[Category("Validation")]
public T Min { get; set; }
Property Value
- T
Pattern
The pattern attribute, when specified, is a regular expression which the input's value must match in order for the value to pass constraint validation. It must be a valid JavaScript regular expression Defaults to [0-9,.\-] To get a numerical keyboard on safari, use the pattern. The default pattern should achieve numerical keyboard.
Note: this pattern is also used to prevent all input except numbers and allowed characters. So for instance to allow only numbers, no signs and no commas you might change it to [0-9.]
[Parameter]
public override string Pattern { get; set; }
Property Value
Step
The increment added/subtracted by the spin buttons.
[Parameter]
[Category("Behavior")]
public T Step { get; set; }
Property Value
- T
Methods
BlurAsync()
public override ValueTask BlurAsync()
Returns
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
ConstrainBoundaries(T)
Checks if the value respects the boundaries set for this instance.
protected (T value, bool changed) ConstrainBoundaries(T value)
Parameters
value
TValue to check.
Returns
Decrement()
Substracts a Step from the Value
public Task Decrement()
Returns
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposing
bool
FocusAsync()
public override ValueTask FocusAsync()
Returns
HandleKeyUp(KeyboardEventArgs)
protected Task HandleKeyUp(KeyboardEventArgs obj)
Parameters
Returns
HandleKeydown(KeyboardEventArgs)
protected Task HandleKeydown(KeyboardEventArgs obj)
Parameters
Returns
Increment()
Adds a Step to the Value
public Task Increment()
Returns
OnAfterRenderAsync(bool)
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
bool
Returns
OnBlurredAsync(FocusEventArgs)
protected override Task OnBlurredAsync(FocusEventArgs obj)
Parameters
obj
FocusEventArgs
Returns
OnMouseWheel(WheelEventArgs)
protected Task OnMouseWheel(WheelEventArgs obj)
Parameters
obj
WheelEventArgs
Returns
SelectAsync()
public override ValueTask SelectAsync()
Returns
SelectRangeAsync(int, int)
public override ValueTask SelectRangeAsync(int pos1, int pos2)
Parameters
Returns
SetValueAsync(T, bool, bool)
protected override Task SetValueAsync(T value, bool updateText = true, bool force = false)
Parameters
Returns
ValidateInput(T)
protected Task<bool> ValidateInput(T value)
Parameters
value
T