Yes, this works. I register the event listener in the component list by sel, then I get the item selected by the selector “.dhx_list-item.dhx_list-item–selected”. This way:
document.querySelector(".dhx_widget.dhx_list").addEventListener('keyup', function (ev) {
const idSelected = $('.dhx_list-item.dhx_list-item--selected').attr('data-dhx-id'); // here i am using jquery
setSelectedItem(list.selection.getId());
});
But in my opinion this seems to be an implementation fault or bug. The list already provides its events, also a way of attaching via the list.events.on() method, and the eventHandlers property to add events to the template in the list, so why only the event keys don’t work?
It wasn’t hard to solve the situation, but I think the api should provide a way to do this.
Anyway, thanks for the guidance, it helped me to solve it.