Ag-grid 自定义工具提示位置变化

Ag-grid custom tooltip position change

如何改变自定义工具提示的位置?例子:总是显示在table

的右上角

目前始终显示在光标下方: pic1

我想显示在table的右上角: pic2

Ag-grid官网代码示例:

https://www.ag-grid.com/javascript-grid-tooltip-component/#example-custom-tooltip

感谢您的帮助!

银格版本:23

有一个 tooltip-component 样式由 Ag-Grid 自动添加。

尝试添加以下内容CSS:

.ag-tooltip-custom {
  top: 5px !important;
  right: 14px !important;
  left: auto !important;
}

!important 很重要,因为我们需要覆盖 tooltip-component.

style

图片中我已经添加到.ag-popup-child,但是你应该把它添加到.ag-tooltip-custom。您也可以玩弄数字。