I am using the ngx-select-ex component.
At my github I have added two instances of that component to test them: src/app/test/app.component.html
I would like to gain the focus of the second component when I press enter on the first one.
If the console is opened it will show 4 elements with 'form-control' class because each ngx-select-ex
component contains 2 subcomponents with this style.
Inside the app.component.ts I capture the 'keydown' event:
@HostListener('component:keydown', ['$event'])
keyEvent(event: KeyboardEvent) {
console.log($('.form-control'));
if (event.key === "Enter") {
// do something stuff
} else {
console.log("else");
}
}
How could I gain the focus of the second ngx-select-ex when I press the 'Enter' key on the first one?
Best regards.