Skip to content

[dev-v5] feat: add conditional addition of name for better SSR experience #4835

@MarvinKlein1508

Description

@MarvinKlein1508

🙋 Feature Request

Native vanilla components can detect if they need to add a name to the component. It would be cool to have this feature as well for our form components. This gets rid of the need to use Name parameter in SSR context which improves the experience in this scenario and results in less code for the developers.

🤔 Expected Behavior

The components should figure this out by themself.

😯 Current Behavior

The developer needs to specify Name for every input in SSR mode.

💁 Possible Solution

In vanilla Blazor this is being implemented like this:

https://github.com/dotnet/aspnetcore/blob/05434a9e554a75c887f204d08849fba337488dc3/src/Components/Web/src/Forms/InputCheckbox.cs#L38

https://github.com/dotnet/aspnetcore/blob/05434a9e554a75c887f204d08849fba337488dc3/src/Components/Web/src/Forms/InputBase.cs#L199

https://github.com/dotnet/aspnetcore/blob/05434a9e554a75c887f204d08849fba337488dc3/src/Components/Web/src/Forms/InputBase.cs#L265

🔦 Context

💻 Examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementA non-feature-adding improvementv5For the next major version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions