Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Suggestion: Create an API on FormControl to focus the input Β #31133

@logic01

Description

@logic01

πŸš€ feature request

Relevant Package

This feature request is for @angular/forms

Description

The FormControl class does not have a FOCUS method.

Describe the solution you'd like

Create an API on FormControl that would easily allow the input to be focused without having to resort to bringing in Renderer or ElementRef.

Describe alternatives you've considered

#12463
#13158

The best response for the Angular team is as follows:

We’re trying to keep our forms modules light and fast, and so it’s important to balance additions to the API with keeping the bundle size manageable.

I fail to see how a focus method would increase bundle size in any significant way. Bits maybe. The trade off by not doing this is that everyone project implement their own focus thus increasing bundle size for nearly every project anyway since focus on an input is practically universal need for modern UI design.

The comment history on both issues show a need. There are several good arguments for this feature and since both issues where closed long ago I am submitting the feature request again to make another community generated push for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: formsfeatureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under consideration

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions