Код: Выделить всё
public async Task methodA(bool isLoading)
{
IsLoading = isLoading;
this.StateHasChanged();
await Task.CompletedTask;
}
< /code>
Я пробовал это, используя следующее < /p>
EventCallback callback=> EventCallback.Factory.Create(this, methodA);
can't convert method group to EventCallback
I need to create this event callback and pass it to the child components using cascading parameters as following
Код: Выделить всё
@Body
@code{
EventCallback callback=> EventCallback.Factory.Create(this, methodA);
public async Task methodA(bool isLoading)
{
IsLoading = isLoading;
this.StateHasChanged();
await Task.CompletedTask;
}
}
Подробнее здесь: https://stackoverflow.com/questions/727 ... -in-blazor
Мобильная версия