Class MBAutocompleteTextField
An autocomplete built using an MBTextField with the anchor and drop down list implementation from a Material Theme select.
public class MBAutocompleteTextField : InputComponent<string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
- Inheritance
-
MBAutocompleteTextField
- Implements
- Inherited Members
Constructors
MBAutocompleteTextField()
public MBAutocompleteTextField()
Properties
AllowBlankResult
Allow unmatched results.
[Parameter]
public bool AllowBlankResult { get; set; }
Property Value
AllowCustomValue
When set, the value that the user enters does not have to match any of the selectable items.
[Parameter]
public bool AllowCustomValue { get; set; }
Property Value
Density
The autcomplete field's density.
[Parameter]
public MBDensity? Density { get; set; }
Property Value
HelperText
Helper text that is displayed either with focus or persistently with HelperTextPersistent.
[Parameter]
public string HelperText { get; set; }
Property Value
HelperTextPersistent
Makes the HelperText persistent if true.
[Parameter]
public bool HelperTextPersistent { get; set; }
Property Value
IconFoundry
The foundry to use for both leading and trailing icons.
IconFoundry="IconHelper.MIIcon()"
IconFoundry="IconHelper.FAIcon()"
IconFoundry="IconHelper.OIIcon()"
Overrides IconFoundryName
[Parameter]
public IMBIconFoundry? IconFoundry { get; set; }
Property Value
IgnoreWhitespace
Ignores whitespace when searching the items list.
[Parameter]
public bool IgnoreWhitespace { get; set; }
Property Value
Label
Field label.
[Parameter]
public string? Label { get; set; }
Property Value
LeadingIcon
The leading icon's name. No leading icon shown if not set.
[Parameter]
public string? LeadingIcon { get; set; }
Property Value
MatchFromItemStart
Forces the search string to match only from the start of each select item.
[Parameter]
public bool MatchFromItemStart { get; set; }
Property Value
SelectItems
List of items to select from.
[Parameter]
public IEnumerable<string> SelectItems { get; set; }
Property Value
TextAlignStyle
The text alignment style.
Overrides TextAlignStyle
[Parameter]
public MBTextAlignStyle? TextAlignStyle { get; set; }
Property Value
TextInputStyle
The text input style.
Overrides TextInputStyle
[Parameter]
public MBTextInputStyle? TextInputStyle { get; set; }
Property Value
TrailingIcon
The trailing icon's name. No leading icon shown if not set.
[Parameter]
public string? TrailingIcon { get; set; }
Property Value
ValidationMessageFor
Delivers Material Theme validation methods from native Blazor validation. Either use this or the Blazor
ValidationMessage
component, but not both. This parameter takes the same input as
ValidationMessage
's For
parameter.
[Parameter]
public Expression<Func<object>> ValidationMessageFor { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposing
bool
NotifyClosed()
For Material Theme to notify when the drop down is closed via JS Interop.
[JSInvokable]
public void NotifyClosed()
NotifySelected(string)
For Material Theme to notify of menu item selection via JS Interop.
[JSInvokable]
public void NotifySelected(string value)
Parameters
value
string
OnInitializedAsync()
protected override Task OnInitializedAsync()
Returns
OnParametersSetAsync()
When overriding this, call await base.OnParametersSetAsync();
before any user code unless there is a very good reason not to.
protected override Task OnParametersSetAsync()