-
Notifications
You must be signed in to change notification settings - Fork 10.3k
API review: Components SSR Forms #50078
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
Comments
Usage examples
The other APIs are for layering (to allow |
API Review Notes:
API approved! |
❓ for documentation ...
... but at least for Pre7 it doesn't seem to be required in the single form case. Is this going to throw in the future? I wasn't placing it on the single-form examples, but it sounds like you want every doc example to show setting it, even in the single-form case. |
It will be required on all forms that are submitted via SSR. That is:
In this SSR-form-post case, it is required on all such form posts that arrive, because otherwise when the POST request arrives we wouldn't know which form it's meant to be dispatched to. The "single form with no name" case would be dangerous and confusing because even if your app works with a single form today, someone might later add a 2nd form with no name somewhere else in the UI, and then the 1st form would become broken because now you have two forms with no name and we don't know which one to dispatch to. Does that make sense? |
API review updates implemented in https://github.com/dotnet/aspnetcore/pull/50181/commits |
Background and Motivation
These are APIs related to form handling with Blazor SSR. Ultimately it's all about making
<form @onsubmit=...>
and<EditForm>
able to trigger actions on the server via an HTTP POST, map the incoming data via[SupplyParameterFromForm]
properties on components, show up any mapping errors as validation errors, and preserve attempted values even if they are unparseable.Proposed API
The text was updated successfully, but these errors were encountered: