Is it possible to do it? I'm currently trying to get a popup to show when something is selected in MudBlazor. But when i try to call the function, with the selectedvalues it never hits it.enter code here
<MudSelect T="string" MultiSelection="true" SelectAll="true" SelectAllText="Select all InputModules" HelperText="@value" @bind-Value="value" @bind-SelectedValues="SelectedInputModules" MultiSelectionTextFunc="@(new Func<List<string>, string>(GetMultiSelectionText))" Label="InputModules" AdornmentIcon="@Icons.Material.Filled.Search">
@foreach (var con in conTask.Select(x => x.InputModuleName).Distinct())
{
<MudSelectItem T="string" Value="@con" OnClick="@(()=> ToggleInputModuleVisibility(SelectedInputModules.ToString()))">@con</MudSelectItem>
}
@code
{ private string value { get; set; } = "Nothing selected";
private IEnumerable<string> SelectedInputModules { get; set; } = new HashSet<string>();
private string GetMultiSelectionText(List<string> selectedValues)
{
return $"{selectedValues.Count} InputModule{(selectedValues.Count > 1 ? "s have" : " has")} been selected";
}
}
I cant quite figure out if its the logic that is off. Or if its a matter of using a different method to hit it. I tried using the "SelectedValuesChanged" but it says the parameter is already used by bind-SelectedValues