Configure additional keyboard key to select custom item

Currently, you can press enter key on Windows to select the custom item entry. How can I configure an additional key such as Tab to select/commit the custom item?


3 Replies 1 reply marked as answer

SN Sevvandhi Nagulan Syncfusion Team June 22, 2021 11:49 AM UTC

Hi Nick, 


Greetings from Syncfusion support. 


We checked your query. We can select the current item when tab on the control using the selectByKey method. Refer the following code and sample. 


  onCreated(){ 
    this.mulObj.inputElement.addEventListener('keydown', (e)=> {  
        if (e.keyCode === 9) {  
            this.mulObj.selectByKey(e);  
            this.mulObj.removeFocus(); 
        }  
    });    
} 





Kindly get back to us for further assistance. 

Regards, 
Sevvandhi N 


Marked as answer

NL Nick Lechnowskyj June 22, 2021 02:53 PM UTC

Perfect. Thank you.



SN Sevvandhi Nagulan Syncfusion Team June 23, 2021 04:04 AM UTC

Hi Nick, 



We are glad to hear that the reported issue has been resolved. Please get back to us if you need further assistance. 



Regards, 
Sevvandhi N 


Loader.
Up arrow icon