JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › ComboBox › clickable post-selected items revisited › Reply To: clickable post-selected items revisited
Hi edwardsmarkf,
Smart.ComboBox has an additional event called tokenClick
which is fired when the user clicks on a token item. The event is cancelable, which means that you can call event.preventDefault()
to prevent the default behavior and execute your custom logic. The event also contains details (event.detail
) which gives information about the clicked item. You can bind to the tokenClick
like so:
document.querySelector('smart-combo-box').addEventListener('tokenClick', function(event) {
console.log(event.detail);
})
It seems that the event is missing from the API documentation for ComboBox but we will add it as soon as possible.
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com