primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Add autofocus to button element

Open pistage opened this issue 4 years ago • 1 comments

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.

pistage avatar Aug 09 '22 08:08 pistage

Hi,

Since this problem occurs across many components, I'm closing this issue and merging them into one https://github.com/primefaces/primeng/issues/11807. We'll fix them altogether.

Thanks for your support and report!

cetincakiroglu avatar Aug 09 '22 10:08 cetincakiroglu