|
|
@ -3,112 +3,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
<h1 style="text-align:center;">Component Sandbox</h1>
|
|
|
|
<h1 style="text-align:center;">Component Sandbox</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<p>ValueDouble: @inputValueDouble.ToString()</p>
|
|
|
|
|
|
|
|
<p>ValueInt: @inputValueInt.ToString()</p>
|
|
|
|
|
|
|
|
<p>ValueText: @inputValueText</p>
|
|
|
|
|
|
|
|
<p>SimpleSelectValue: @SelectedItemValue</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<InputNumber
|
|
|
|
<p>SelectedValue: @SelectedValue.ToString()</p>
|
|
|
|
Clearable="false"
|
|
|
|
|
|
|
|
DisableMouseWheel="false"
|
|
|
|
|
|
|
|
Disabled="false"
|
|
|
|
|
|
|
|
Readonly="false"
|
|
|
|
|
|
|
|
Placeholder="Double"
|
|
|
|
|
|
|
|
Label="Double"
|
|
|
|
|
|
|
|
Required="true"
|
|
|
|
|
|
|
|
Step="0.000516"
|
|
|
|
|
|
|
|
DecimalPlaces=5
|
|
|
|
|
|
|
|
Class="m-2"
|
|
|
|
|
|
|
|
@bind-Value="@inputValueDouble">
|
|
|
|
|
|
|
|
</InputNumber>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<InputNumber
|
|
|
|
|
|
|
|
Clearable="true"
|
|
|
|
|
|
|
|
DisableMouseWheel="false"
|
|
|
|
|
|
|
|
Disabled="false"
|
|
|
|
|
|
|
|
Readonly="false"
|
|
|
|
|
|
|
|
Placeholder="Double"
|
|
|
|
|
|
|
|
Label="Integer"
|
|
|
|
|
|
|
|
Required="true"
|
|
|
|
|
|
|
|
Step="0.001"
|
|
|
|
|
|
|
|
DecimalPlaces="2"
|
|
|
|
|
|
|
|
Class="m-4"
|
|
|
|
|
|
|
|
@bind-Value="@inputValueInt">
|
|
|
|
|
|
|
|
</InputNumber>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<InputText
|
|
|
|
|
|
|
|
Label="String"
|
|
|
|
|
|
|
|
Required="true"
|
|
|
|
|
|
|
|
ErrorText="@errorText"
|
|
|
|
|
|
|
|
@bind-Value="@inputValueText">
|
|
|
|
|
|
|
|
</InputText>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<InputText
|
|
|
|
|
|
|
|
Label="Password"
|
|
|
|
|
|
|
|
IsPassword="true"
|
|
|
|
|
|
|
|
Required="true"
|
|
|
|
|
|
|
|
ErrorText="@errorText"
|
|
|
|
|
|
|
|
@bind-Value="@inputValueText">
|
|
|
|
|
|
|
|
</InputText>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<SimpleSelect
|
|
|
|
<SimpleSelect
|
|
|
|
Label="Simple Select"
|
|
|
|
Items="@items"
|
|
|
|
|
|
|
|
Label="Simple select"
|
|
|
|
ValueType="string"
|
|
|
|
@bind-Value=@SelectedValue
|
|
|
|
@bind-Value="@SelectedItemValue"
|
|
|
|
/>
|
|
|
|
Items="@SelectFieldItems">
|
|
|
|
|
|
|
|
</SimpleSelect>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@code {
|
|
|
|
@code {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int SelectedValue;
|
|
|
|
|
|
|
|
|
|
|
|
List<SelectItem<string>> SelectFieldItems = new();
|
|
|
|
List<int> items;
|
|
|
|
string SelectedItemValue = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int counter { get; set; } = 0;
|
|
|
|
private void FillItemsList()
|
|
|
|
|
|
|
|
|
|
|
|
private string _inputText = string.Empty;
|
|
|
|
|
|
|
|
string inputValueText
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return _inputText;
|
|
|
|
if (items is null) items = new();
|
|
|
|
}
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (value.Length > 0) errorText = "Error!!!";
|
|
|
|
|
|
|
|
else errorText = "";
|
|
|
|
|
|
|
|
_inputText = value;
|
|
|
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
double inputValueDouble = 12.756;
|
|
|
|
|
|
|
|
int inputValueInt = 12;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DateTime inputValueDate = DateTime.Now.AddDays(-10);
|
|
|
|
Random random = new Random(DateTime.Now.Millisecond);
|
|
|
|
|
|
|
|
|
|
|
|
public void CounterIncrement()
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
counter++;
|
|
|
|
int item = random.Next();
|
|
|
|
|
|
|
|
items.Add(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
StateHasChanged();
|
|
|
|
StateHasChanged();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string errorText = "Error!!";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 1", Value = "select item value 1", Enabled = true });
|
|
|
|
FillItemsList();
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 2", Value = "select item value 2", Enabled = true });
|
|
|
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 3", Value = "select item value 3", Enabled = true });
|
|
|
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 4", Value = "select item value 4", Enabled = true });
|
|
|
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 5", Value = "select item value 5", Enabled = false });
|
|
|
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 6", Value = "select item value 6", Enabled = true });
|
|
|
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 7", Value = "select item value 7", Enabled = true });
|
|
|
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 8", Value = "select item value 8", Enabled = false });
|
|
|
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 9", Value = "select item value 9", Enabled = true });
|
|
|
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 10", Value = "select item value 10", Enabled = true });
|
|
|
|
|
|
|
|
SelectedItemValue = SelectFieldItems[0].Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|