Hi Mariano, thank you for your project. It it was just what I was looking for.
I confirm that it works in Blazor Web Assembly too (not only Server version).
I suggest a little change in code to get Two-Way Binding:
[Parameter]
public string ColorStr { get; set; }
[Parameter]
public EventCallback<string> ColorStrChanged { get; set; }
async Task UpdateIt(ChangeEventArgs e)
{
ColorStr = e.Value.ToString();
await ColorStrChanged.InvokeAsync(ColorStr);
}
So in the page you can use it in this way
<ColorSelector @bind-ColorStr="@MyColor"></ColorSelector>
Best regards,
Mattia
Hi Mariano, thank you for your project. It it was just what I was looking for.
I confirm that it works in Blazor Web Assembly too (not only Server version).
I suggest a little change in code to get Two-Way Binding:
So in the page you can use it in this way
Best regards,
Mattia