I wrote a login form in Blazor (with some MudBlazor elements) and now I’ve run the app but after filling in the form and pressing the Submit button nothing happens. What am I doing wrong?
<EditForm Style="width: 700px;" Model="@_loginModel" OnValidSubmit="OnValidLoginSubmit" FormName="LoginForm">
<DataAnnotationsValidator />
<MudGrid Style="width: 100%;">
<MudItem Style="width: 100%;">
<MudPaper Width="100%">
<MudCardContent>
<MudTextField Label="Username or email" HelperText="Type either your username or email" @bind-Value="_loginModel.UsernameOrEmail" For="@(() => _loginModel.UsernameOrEmail)" ErrorText="@_loginUsernameErrorText" OnBlur="OnBlurCallback" />
<MudTextField Label="Password" HelperText="Type your password" Class="mt-3" @bind-Value="_loginModel.Password" For="@(() => _loginModel.Password)" InputType="InputType.Password" />
</MudCardContent>
@if (_backendLoginResponse is not null)
{
<MudAlert Severity="Severity.Error">@_backendLoginResponse</MudAlert>
}
<MudCardActions>
<MudButton ButtonType="ButtonType.Submit" Variant="Variant.Filled" Color="Color.Primary" Class="ml-auto">Login</MudButton>
</MudCardActions>
</MudPaper>
</MudItem>
</MudGrid>
</EditForm>