mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 22:52:10 +00:00
18 lines
946 B
Plaintext
18 lines
946 B
Plaintext
@typeparam T
|
|
@inherits EnumSelectionBase
|
|
|
|
<MudStack Row="@true" Class="mb-3">
|
|
<MudSelect T="@T" Value="@this.Value" ValueChanged="@this.SelectionChanged" AdornmentIcon="@this.Icon" Adornment="Adornment.Start" IconSize="@this.IconSize" Label="@this.Label" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateSelection" Disabled="@this.Disabled">
|
|
@foreach (var value in Enum.GetValues<T>())
|
|
{
|
|
<MudSelectItem Value="@value">
|
|
@this.NameFunc(value)
|
|
</MudSelectItem>
|
|
}
|
|
</MudSelect>
|
|
@if (this.AllowOther && this.Value.Equals(this.OtherValue))
|
|
{
|
|
<MudTextField T="string" Text="@this.OtherInput" TextChanged="this.OtherValueChanged" Validation="@this.ValidateOther" Label="@this.LabelOther" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" Immediate="@true" Disabled="@this.Disabled"/>
|
|
}
|
|
</MudStack>
|