Skip to content

Let InputFile's AdditionalAttributes be of type IReadOnlyDictionary<string object>? #62421

Closed
@RiRiSharp

Description

@RiRiSharp

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.

I'm building a component library and want to reuse ASP.NET Core's input components as much as possible. I created a base class like this:

public class LibraryBaseComponent {
    [Parameter(CaptureUnmatchedValues = true)]
    public IReadOnlyDictionary<string, object>? AdditionalAttributes { get; set; }
    //...
}

Since multiple inheritance isn't possible, I use an interface with the same property. This works well, except for InputFile, which uses IDictionary<string, object>? instead of IReadOnlyDictionary<string, object>?.

This inconsistency makes integration harder and seems arbitrary.

Describe the solution you'd like

Update InputFile to use IReadOnlyDictionary<string, object>? for AdditionalAttributes, aligning it with other components. Ideally, this pattern would be consistent across all ASP.NET Core components.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions