diff --git a/src/DotNetElements.Web.MudBlazor/ChipSelect.razor b/src/DotNetElements.Web.MudBlazor/ChipSelect.razor index 0be6101..40d208a 100644 --- a/src/DotNetElements.Web.MudBlazor/ChipSelect.razor +++ b/src/DotNetElements.Web.MudBlazor/ChipSelect.razor @@ -93,6 +93,9 @@ [Parameter, EditorRequired] public List SelectedItems { get; set; } = default!; + [Parameter, EditorRequired] + public Func> InitialSelectedItemsFunc { get; set; } = default!; + // todo update logic 2 (check which of the two update logics are better) // [Parameter] // public EventCallback> SelectedItemsChanged { get; set; } @@ -137,7 +140,7 @@ protected override void OnInitialized() { - selectedItems_Internal = [.. SelectedItems]; + selectedItemsBinding = new HashSet(InitialSelectedItemsFunc.Invoke()); } protected override void OnParametersSet()