Hi Halit,
Your
requirement can be achivebale in our LIstbox by binding the keyDown
event in Listbox created event as like as below.
function onCreated(): void {
document
.getElementsByClassName('e-listbox-wrapper e-custom')[0]
.querySelectorAll('.e-list-parent')[0]
.addEventListener(
'keydown',
function (e) {
if (e.keyCode == 65 || e.keyCode == 97) {
// prevent ctrl+ a action
e.stopImmediatePropagation();
// do your own action here
}
},
true
);
}
// Initialize ListBox component.
let listObj: ListBox = new ListBox({
// Set the data source property.
dataSource: (data as any).info,
created: onCreated,
cssClass: 'e-custom',
});
|
For your convenience, we have prepared
the sample based on our suggestion. In this
we have prevented the Ctrl + A action in created event with custom CSS and do
your own customization in that event based on your need. Please find the link
below.
Sample Link: https://stackblitz.com/edit/r6f9ya?file=index.ts
Could you please check the attached
sample and get back to us, if you need any further assistance on this.
Regards,
Sangeetha M