Our blazing fast Grid component built with pure JavaScript


Post by sipi41 »

Hello and thank you for reading. We would like to ask if is possible to have events on combo items, for example, we have a combo of X, we would like when the mouse is over an option, to show some info in a tooltip about the option you are about to click... is that possible?

Thank you for all the information you may provide.


Post by tasnim »

Yes, It is possible. You have to use the listItemTpl config, and add data-btip attribute to whatever text you want to show in the tooltip.

Here is an example of how you can achieve that:

new Combo({
    ...
    listItemTpl : item => {
        console.log(item);
        return `<i data-btip="Tooltip text here">${item.text}</i>`;
    }
});

Best regards,
Tasnim


Post Reply