Skip to content

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

Open

Description

🙋 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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementA non-feature-adding improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions