Skip to content

WebComponents Forms InputFile - Change the _inputFileElement field to protected so a class can be derived from InputFile #28533

@Valks

Description

@Valks

Hi,
I'm wondering if it's possible to have the InputFile.cs line 20 changed to protected instead of private so that it can be used in a derived class which replaces the BuildRenderTree().

private ElementReference _inputFileElement;

The reason this change is necessary is that the elementReference needs to be set during the BuildRenderTree() call for the component to work.

builder.AddElementReferenceCapture(3, elementReference => _inputFileElement = elementReference);

I'm happy to submit a PR with the change, just wondering if there's any concerns I'm not aware of?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions