Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autofocus to button element #11806

Closed
quranc opened this issue Aug 9, 2022 · 1 comment
Closed

Add autofocus to button element #11806

quranc opened this issue Aug 9, 2022 · 1 comment

Comments

@quranc
Copy link
Contributor

quranc commented Aug 9, 2022

Describe the feature you would like to see added

Similar to how other existing components (Dropdown, InputMask, AutoComplete) are possible to have a autofocus property, this could also be a property to the button element.
This can today be done by using angular directives.

Is your feature request related to a problem?

Instead of having to make a new class/file, this could instead be done by just adding a single attribute to the element.

Describe the solution you'd like

Autofocus enabled:
<p-button [autofocus]="true"></p-button>

autofocus=on

Autofocus disabled:
<p-button [autofocus]="false"></p-button>
<p-button></p-button>

autofocus=off

Describe alternatives you have considered

New file/class with autodirectives

Additional context

Should not be too much work since this is already implemented in other primeng components.

@quranc quranc added the Type: New Feature Issue contains a new feature or new component request label Aug 9, 2022
@cetincakiroglu cetincakiroglu removed the Type: New Feature Issue contains a new feature or new component request label Aug 9, 2022
@cetincakiroglu
Copy link
Contributor

Hi,

Since this problem occurs across many components, I'm closing this issue and merging them into one #11807. We'll fix them altogether.

Thanks for your support and report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants