RED-9453 - prevent enter key
This commit is contained in:
parent
ca0db25484
commit
1c48cea02e
@ -1,5 +1,15 @@
|
||||
import { NgClass } from '@angular/common';
|
||||
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, EventEmitter, inject, input, Output } from '@angular/core';
|
||||
import {
|
||||
booleanAttribute,
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
computed,
|
||||
EventEmitter,
|
||||
HostListener,
|
||||
inject,
|
||||
input,
|
||||
Output,
|
||||
} from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { RouterLink } from '@angular/router';
|
||||
@ -33,4 +43,10 @@ export class IconButtonComponent {
|
||||
};
|
||||
});
|
||||
@Output() readonly action = new EventEmitter<MouseEvent>();
|
||||
|
||||
@HostListener('window:keydown.Enter', ['$event'])
|
||||
preventEnterKey($event: KeyboardEvent) {
|
||||
$event?.preventDefault();
|
||||
$event?.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user