Our blazing fast Grid component built with pure JavaScript


Post by kerstin »

Hi,

How can I use tooltipRenderer in a cell with multiple values? Setting tooltipRenderer on column object gives me all values in the cell and not only the one I am pointing at.

BR,
//k

Post by johan.isaksson »

Hello,

`toolTipRenderer` is passed an `event` parameter, which is the mouseevent. Maybe you could us its target (event.target) to determine which element is hovered?

Best regards,
Johan Isaksson
Best regards,
Johan Isaksson

Post by kerstin »

Thanks!

Finding element id works fine!

I have another problem, is it possible set tooltip render event on element instead of cell? Now the tooltip render is only called when moving mouse pointer to another cell, not when moving to another element in the same cell.

BR,
//k

Post by mats »

This issue is too specific for your environment, so maybe better you create your own tooltip? If you look at our CellTooltip - you'll see it's tiny, you can clone it and create your own that matches your requirements better.

Post by kerstin »

Thanks,

Sorry, not sure how to do this.
Our own tooltip works fine except when one cell has more than one element. Moving between cells shows different tooltips but moving between elements in the same cell doesn't trigger the tooltip renderer. Can I set the tooltipRenderer on the element instead of the cell?

BR,
//k

Post by mats »

The grid's built in cell tooltip is designed to trigger only when moving across cells. It might be easier for you to create your own tooltip. If you open our CellTooltip file you'll see how little code is actually used.

Post Reply