Table of Contents

Class MBAutocompletePagedField<TItem>

Namespace
Material.Blazor
Assembly
Material.Blazor.dll

An autocomplete built using an MBTextField with the anchor and drop down list implementation from a Material Theme select.

public class MBAutocompletePagedField<TItem> : SingleSelectComponent<TItem, MBSelectElement<TItem>>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Type Parameters

TItem
Inheritance
MBAutocompletePagedField<TItem>
Implements
Inherited Members

Constructors

MBAutocompletePagedField()

public MBAutocompletePagedField()

Properties

AllowBlankResult

Allow unmatched results.

[Parameter]
public bool AllowBlankResult { get; set; }

Property Value

bool

DebounceInterval

Debounce interval in milliseconds.

[Parameter]
public int? DebounceInterval { get; set; }

Property Value

int?

Density

The autcomplete field's density.

[Parameter]
public MBDensity? Density { get; set; }

Property Value

MBDensity?

GetMatchingSelection

REQUIRED: an async method returning an enumerated selection list. Parameters are the search string, followed by the requested page number, and then the page size.

[Parameter]
public Func<string, int, int, Action<MBPagedSearchResult<TItem>>, Task> GetMatchingSelection { get; set; }

Property Value

Func<string, int, int, Action<MBPagedSearchResult<TItem>>, Task>

GetSelectElement

REQUIRED: Gets a select element matching the supplied selected value.

[Parameter]
public Func<TItem, Action<MBSelectElement<TItem>>, Task> GetSelectElement { get; set; }

Property Value

Func<TItem, Action<MBSelectElement<TItem>>, Task>

HelperText

Helper text that is displayed either with focus or persistently with HelperTextPersistent.

[Parameter]
public string HelperText { get; set; }

Property Value

string

HelperTextPersistent

Makes the HelperText persistent if true.

[Parameter]
public bool HelperTextPersistent { get; set; }

Property Value

bool

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

IMBIconFoundry

Label

Field label.

[Parameter]
public string? Label { get; set; }

Property Value

string

LeadingIcon

The leading icon's name. No leading icon shown if not set.

[Parameter]
public string? LeadingIcon { get; set; }

Property Value

string

MatchingItemCount

public int MatchingItemCount { get; set; }

Property Value

int

MenuSurfacePositioning

Menu surface positioning, defaults to Fixed.

[Parameter]
public MBMenuSurfacePositioning MenuSurfacePositioning { get; set; }

Property Value

MBMenuSurfacePositioning

SelectItemsPerColumn

The number of items to be displayed per column for a given paged selection.

[Parameter]
public int SelectItemsPerColumn { get; set; }

Property Value

int

TextAlignStyle

The text alignment style.

Overrides TextAlignStyle

[Parameter]
public MBTextAlignStyle? TextAlignStyle { get; set; }

Property Value

MBTextAlignStyle?

TextInputStyle

The text input style.

Overrides TextInputStyle

[Parameter]
public MBTextInputStyle? TextInputStyle { get; set; }

Property Value

MBTextInputStyle?

TrailingIcon

The trailing icon's name. No leading icon shown if not set.

[Parameter]
public string? TrailingIcon { get; set; }

Property Value

string

ValidationMessageFor

       Delivers Material Theme validation methods from native Blazor validation. Either use this or
       the Blazor 

       <pre><code class="lang-csharp">ValidationMessage</code></pre>

component, but not both. This parameter takes the same input as

       <pre><code class="lang-csharp">ValidationMessage</code></pre>

       's 

       <pre><code class="lang-csharp">For</code></pre>

parameter.

[Parameter]
public Expression<Func<object>> ValidationMessageFor { get; set; }

Property Value

Expression<Func<object>>

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()

OnInitializedAsync()

protected override Task OnInitializedAsync()

Returns

Task

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()

Returns

Task

RequerySearchText()

Forces the component to re-query search text. This can be used if the search text associated with the component's value changes. For example if the Value parameter is a Guid but the search text associated with it changes in your app, call this method to update the component accordingly.

public Task RequerySearchText()

Returns

Task