-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I've been following input components documentation: https://learn.microsoft.com/en-us/aspnet/core/blazor/forms/input-components?view=aspnetcore-8.0
And I've created the application with starship form page:

After I provide all values and submit the form, the "Primary Classification" InputSelect component clears it's value, and when I try to click the Submit button again, I get the validation error. But the rest of the values are preserved. Only the one from InputSelect is cleared out.
The InputSelect component looks like this, straight from the docs:

The Submit method logs the values properly and I can see the Classification that i've selected.

But after the first post, the selected value is cleared.
I've provided the demo app on github:
https://github.com/sikora507/blazor-selectinput-issue
The issue does not occur when I use
@rendermode InteractiveServer
Expected Behavior
After submitting the form, the selection should remain the same like for the rest of input controls
Steps To Reproduce
- run
git clone [email protected]:sikora507/blazor-selectinput-issue.git - run the bazor app
- Fill the form in Forms page:

- Click submit. The selection will be cleared

- Trying submitting the form again with cleared form celection will cause validation error:

Exceptions (if any)
No response
.NET Version
8.0.100
Anything else?
IDE: JetBrains Rider 2023.3.1