Table of Contents

Class ComboBox<T>

Namespace
The.Web.Widgets
Assembly
Instagile.Web.Client.dll
public class ComboBox<T> : CancellableComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IWidget<T?>

Type Parameters

T
Inheritance
ComboBox<T>
Implements
Inherited Members

Fields

_CurrentOptions

protected List<T> _CurrentOptions

Field Value

List<T>

Properties

AttachBottom

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

Property Value

bool

AttachLeft

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

Property Value

bool

AttachRight

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

Property Value

bool

AttachTop

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

Property Value

bool

FocusChanged

[Parameter]
public EventCallback<bool> FocusChanged { get; set; }

Property Value

EventCallback<bool>

HasChanges

If true, display a visual indication to the user.

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

Property Value

bool

JS

[Inject]
public IJSRuntime JS { get; set; }

Property Value

IJSRuntime

MaxOptions

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

Property Value

int

Options

[Parameter]
public IReadOnlyList<T>? Options { get; set; }

Property Value

IReadOnlyList<T>

OptionsQuery

[Parameter]
public IEntityQuery<T>? OptionsQuery { get; set; }

Property Value

IEntityQuery<T>

OptionsQueryFactory

Creates a query which searches for the given text or, if the filter is null, for everything.

[Parameter]
public Func<string?, IEntityQuery<T>>? OptionsQueryFactory { get; set; }

Property Value

Func<string, IEntityQuery<T>>

OptionsQueryable

[Parameter]
public IQueryable<T>? OptionsQueryable { get; set; }

Property Value

IQueryable<T>

OptionsQueryableFactory

Creates a query which searches for the given text or, if the filter is null, for everything.

[Parameter]
public Func<string?, IQueryable<T>>? OptionsQueryableFactory { get; set; }

Property Value

Func<string, IQueryable<T>>

Services

[Inject]
public IServices Services { get; set; }

Property Value

IServices

Validity

If set, display a visual indication to the user.

[Parameter]
public MessageLevel? Validity { get; set; }

Property Value

MessageLevel?

Value

Bindable typed value.

[Parameter]
public T? Value { get; set; }

Property Value

T

ValueChanged

Triggered when data is entered by the user.

[Parameter]
public EventCallback<T?> ValueChanged { get; set; }

Property Value

EventCallback<T>

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

OnAfterRenderAsync(bool)

Method invoked after each time the component has been rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any ElementReference fields will be populated by the time this runs.

This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.

Note that the component does not automatically re-render after the completion of any returned Task, because that would cause an infinite render loop.

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Set to true if this is the first time OnAfterRender(bool) has been invoked on this component instance; otherwise false.

Returns

Task

A Task representing any asynchronous operation.

Remarks

The OnAfterRender(bool) and OnAfterRenderAsync(bool) lifecycle methods are useful for performing interop, or interacting with values received from @ref. Use the firstRender parameter to ensure that initialization work is only performed once.

OnInitialized()

Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

protected override void OnInitialized()

OnParametersSetAsync()

Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

protected override Task OnParametersSetAsync()

Returns

Task

A Task representing any asynchronous operation.

SelectOption(T?)

public Task SelectOption(T? value)

Parameters

value T

Returns

Task

UpdateOptions()

public Task UpdateOptions()

Returns

Task