i have multiple components in the same page with table inside. Each of these table has a @HostListener waiting for the "Ctr + B" keyboard shortcut to be pressed when this happens a row added in the specific table. How i can focus in specific table ? with my current implementation row added to all tables in the same time
@HostListener('document:keypress', ['$event'])
handleKeyboardEvent($event: KeyboardEvent) {
let keyCode = $event.key;
if(($event.ctrlKey || $event.metaKey) && keyCode == '\x02') {
console.log('CTRL + B');
this.onAdd();
}
console.log($event);
}