Table of Contents

Class ValueFieldBase<T>

Namespace
The.Web.Entities.Fields
Assembly
Instagile.Web.Client.dll
public class ValueFieldBase<T> : FieldBase<IValue<T?>, IEntity?>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IValidatable<IValue<T?>>, IValidatable

Type Parameters

T
Inheritance
ValueFieldBase<T>
Implements
Derived
Inherited Members

Properties

FocusChangedCallback

protected EventCallback<bool> FocusChangedCallback { get; }

Property Value

EventCallback<bool>

HasValue

Indicates whether the validatable field has a value set

public override bool HasValue { get; }

Property Value

bool

Model

protected virtual T? Model { get; set; }

Property Value

T

Parent

public override IEntity? Parent { get; }

Property Value

IEntity

Methods

BindingValueChanged(object?, EventArgs)

protected virtual void BindingValueChanged(object? sender, EventArgs e)

Parameters

sender object
e EventArgs

CanParse()

Indicates whether the validatable field has a value that can be parsed

public override bool CanParse()

Returns

bool

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

HasChanges()

public override bool HasChanges()

Returns

bool

OnAddValidationRules()

Called when the validation rules are added. This allows FieldBase implementations to override this method to provide validation rules at the field level (in addition to those passed in via the Rules parameter)

protected override void OnAddValidationRules()

OnAfterRender(bool)

Method invoked after each time the component has 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.

protected override void OnAfterRender(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.

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.

OnCanParseChanged(bool)

protected void OnCanParseChanged(bool canParse)

Parameters

canParse bool

OnParametersSet()

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

OnValidationChanged()

protected override void OnValidationChanged()

ShouldRender()

Returns a flag to indicate whether the component should render.

protected override bool ShouldRender()

Returns

bool