Class SelectField<T>
Represents a select input field.
public class SelectField<T> : TrinityField<SelectField<T>, T>, ITrinityComponent, ITrinityField, IFormComponent
Type Parameters
T
The type of the field's value.
- Inheritance
-
TrinityComponent<SelectField<T>, T>TrinityField<SelectField<T>, T>SelectField<T>
- Implements
- Derived
- Inherited Members
Constructors
SelectField(string)
public SelectField(string columnName)
Parameters
columnName
string
Properties
ComponentName
The component name in the front-end side.
public override string ComponentName { get; }
Property Value
Options
Gets or sets the options for the select field.
public List<KeyValuePair<string, string>>? Options { get; protected set; }
Property Value
Searchable
A value indicating whether this field is searchable.
public bool Searchable { get; protected set; }
Property Value
Methods
SetAsSearchable(bool)
Sets this field as searchable .
public virtual SelectField<T> SetAsSearchable(bool searchable = true)
Parameters
searchable
boolA value indicating whether this field is searchable.
Returns
- SelectField<T>
SetOptions(List<KeyValuePair<string, string>>)
Sets the options for the select field.
public SelectField<T> SetOptions(List<KeyValuePair<string, string>> options)
Parameters
options
List<KeyValuePair<string, string>>The options to be set.
Returns
- SelectField<T>
The current instance of SelectField<T> field.