Skip to content

Enhance forms should isolate updates to their own DOM subtree or a specified element #61863

Open
@Ali1Jamal

Description

@Ali1Jamal

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

In Blazor SSR with enhanced navigation (Enhance on ), when a page has multiple components, submitting one form causes the entire page to re-render based on the parameters from [SupplyParameterFromForm]. This often results in:
• Other forms being reset unintentionally
• Unrelated components receiving unexpected updates or data loss

Describe the solution you'd like

Add an option to to limit the update scope to only the child DOM subtree of the submitted form or
another element.

Possible approach:
• A new parameter for EditForm like IsolatedEnhanceName="form1" to scope rendering to the form’s children or to scope to any element with attribute maybe like form-isolated-name="form1".

its will looks like this:
<EditForm Enhance IsolatedEnhanceName="form1" >
if there element with :

<div form-isolated-name="form1">
</div>

it will only update the child of this div , else it will update only child of that form.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions