Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap tooltip inside ag-grid cell showing partially

I am trying to show bootstrap tooltip in ag-grid cell on hover. Issue is it's showing up partially while part of the tooltip is behind the next column cell. I tried setting z-index for tooltip. But still not able to succeed. Kindly help. enter image description here

like image 438
code chimp Avatar asked Sep 01 '17 12:09

code chimp


People also ask

How do you show tooltip on Ag grid?

Default Browser Tooltip If you don't want to use the grid's tooltip component, you can use the enableBrowserTooltips config to use the browser's default tooltip. The grid will simply set an element's title attribute to display the tooltip.

How do I add a tooltip to Ag grid column?

When we want to display a header tooltip, we set the headerTooltip config as a string , and that string will be displayed as the tooltip. However, when working with custom tooltips we set colDef. tooltipComponent to assign the column's tooltip component and the headerTooltip value will passed to the params object.

How do I enable Bootstrap tooltip?

To create a tooltip, add the data-toggle="tooltip" attribute to an element. Note: Tooltips must be initialized with jQuery: select the specified element and call the tooltip() method.


2 Answers

In ngx-bootstrap documentation:

When you have some styles on a parent element that interfere with a tooltip, you’ll want to specify a container="body" so that the tooltip’s HTML will be appended to body. This will help to avoid rendering problems in more complex components (like our input groups, button groups, etc) or inside elements with overflow: hidden

You can use the attribute container="body" to solve the problem

like image 123
kba04 Avatar answered Sep 30 '22 00:09

kba04


You can use CSS tooltips, which will work inside agGrid cells. Please take a look at this plnkr: tooltip in agGrid cell

[data-tooltip]:before {
  content: attr(data-tooltip);
  display: none;
  position: fixed;
  margin: 10px 10px 10px 10px;    
}
like image 38
gunnerwhocodes Avatar answered Sep 29 '22 23:09

gunnerwhocodes