|
|
|
@ -3,112 +3,39 @@
|
|
|
|
|
|
|
|
|
|
<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
|
|
|
|
|
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>
|
|
|
|
|
<p>SelectedValue: @SelectedValue.ToString()</p>
|
|
|
|
|
|
|
|
|
|
<SimpleSelect
|
|
|
|
|
Label="Simple Select"
|
|
|
|
|
|
|
|
|
|
ValueType="string"
|
|
|
|
|
@bind-Value="@SelectedItemValue"
|
|
|
|
|
Items="@SelectFieldItems">
|
|
|
|
|
</SimpleSelect>
|
|
|
|
|
Items="@items"
|
|
|
|
|
Label="Simple select"
|
|
|
|
|
@bind-Value=@SelectedValue
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@code {
|
|
|
|
|
|
|
|
|
|
int SelectedValue;
|
|
|
|
|
|
|
|
|
|
List<SelectItem<string>> SelectFieldItems = new();
|
|
|
|
|
string SelectedItemValue = "";
|
|
|
|
|
List<int> items;
|
|
|
|
|
|
|
|
|
|
int counter { get; set; } = 0;
|
|
|
|
|
|
|
|
|
|
private string _inputText = string.Empty;
|
|
|
|
|
string inputValueText
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
private void FillItemsList()
|
|
|
|
|
{
|
|
|
|
|
return _inputText;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value.Length > 0) errorText = "Error!!!";
|
|
|
|
|
else errorText = "";
|
|
|
|
|
_inputText = value;
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
double inputValueDouble = 12.756;
|
|
|
|
|
int inputValueInt = 12;
|
|
|
|
|
if (items is null) items = new();
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string errorText = "Error!!";
|
|
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
|
{
|
|
|
|
|
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 1", Value = "select item value 1", Enabled = true });
|
|
|
|
|
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;
|
|
|
|
|
FillItemsList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|