Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HxCheckbox] Issue with Static Rendering in Blazor Web App #835

Open
TPIvan opened this issue Jun 20, 2024 · 1 comment
Open

[HxCheckbox] Issue with Static Rendering in Blazor Web App #835

TPIvan opened this issue Jun 20, 2024 · 1 comment
Assignees

Comments

@TPIvan
Copy link
Contributor

TPIvan commented Jun 20, 2024

When the InputCheckbox in the Login.razor page of the Blazor Web App template project is replaced with HxCheckbox, an error message is displayed upon form submission:

   The value 'on' is not valid for 'RememberMe'.

This occurs when the "Remember me" checkbox is checked and the "Log in" button is clicked. The likely cause of this issue is that HxCheckbox does not have a Value attribute set, which is necessary for binding the checkbox state to the model property. Below is a comparison of the HTML code rendered for both HxCheckbox and InputCheckbox:
image

Steps to Reproduce

  1. Create a new project in Visual Studio using the Blazor Web App project template. In the wizard select Authentication Type: None, Interactive render mode: None, Interactivity location: Global.
  2. Add the Havit.Blazor.Components.Web.Bootstrap NuGet package (version 4.6.8) to the project and configure it according to the Havit Getting Started Guide.
  3. Replace the content of Home.razor with the code from the attached file Home.razor.txt (remove the .txt extension).
  4. Run the application, check the Havit checkbox, and click Submit. The aforementioned error message will be displayed.
@rqx110
Copy link
Contributor

rqx110 commented Jun 21, 2024

it is the same problem I mentioned before. #707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants