|
|
@ -29,30 +29,13 @@ public partial class SimpleSelect<ValueType> : InputBase
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private string DropDownClass { get; set; } = "drop-down";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool DropDownClicked = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void DropDownClassToggle()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DropDownClicked = !DropDownClicked;
|
|
|
|
|
|
|
|
if (DropDownClicked)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DropDownClass = "";
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DropDownClass = "drop-down";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private async Task SetSelectedItem(ValueType item)
|
|
|
|
private async Task SetSelectedItem(ValueType item)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//DropDownClassToggle();
|
|
|
|
//DropDownClassToggle();
|
|
|
|
await ValueChanged.InvokeAsync(item);
|
|
|
|
await ValueChanged.InvokeAsync(item);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async Task FilterItems()
|
|
|
|
private void FilterItems()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (string.IsNullOrEmpty(_searchText))
|
|
|
|
if (string.IsNullOrEmpty(_searchText))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -78,7 +61,7 @@ public partial class SimpleSelect<ValueType> : InputBase
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
OriginalItems = Items;
|
|
|
|
OriginalItems = Items;
|
|
|
|
if (_searchText.Length>0) await FilterItems();
|
|
|
|
if (_searchText.Length>0) FilterItems();
|
|
|
|
await base.OnParametersSetAsync();
|
|
|
|
await base.OnParametersSetAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|