Skip to content

Commit

Permalink
feat(input): adicionando evento tecla enter
Browse files Browse the repository at this point in the history
O componente não escutava  evento keyup.enter. Este commit implementa evento tecla enter.

Fixes #1765, DTHFUI-7528
  • Loading branch information
FelipeDuarteLuna committed Jul 25, 2023
1 parent 7d140e3 commit 4754925
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ export abstract class PoInputBaseComponent implements ControlValueAccessor, Vali
*/
@Output('p-blur') blur: EventEmitter<any> = new EventEmitter();

/**
* @optional
*
* @description
*
* Evento disparado ao pressionar tecla enter.
*/
@Output('p-enter-click') enterClick: EventEmitter<any> = new EventEmitter();

/**
* @optional
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
(click)="eventOnClick($event)"
(focus)="eventOnFocus($event)"
(input)="eventOnInput($event)"
(keyup.enter)="enterClick.emit($event.target)"
/>

<div class="po-field-icon-container-right">
Expand Down

0 comments on commit 4754925

Please sign in to comment.