K
K
Konstantin2020-02-19 18:37:24
Angular
Konstantin, 2020-02-19 18:37:24

How to navigate through the li list by pressing down/up keys?

There is a ul list with elements.

How to highlight list item by pressing up/down keys? Roughly speaking, to select elements?

Tried creating a link to a DOM element:

@ViewChild("SearchList", { static: false }) searchResultList: ElementRef;


Then somehow it is necessary to impose a wiretap on the keydn event

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-02-19
@Junart1

https://stackblitz.com/edit/angular-gbfxrp?file=sr...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question