【问题标题】:Ag-grid custom tooltip position changeAg-grid 自定义工具提示位置更改
【发布时间】:2020-08-12 04:56:05
【问题描述】:

如何更改自定义工具提示的位置?示例:始终显示在表格的右上角

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

我想在表格的右上角显示: pic2

来自Ag-grid官网的代码示例:

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

感谢您的帮助!

Ag-grid 版本:23

【问题讨论】:

    标签: angular tooltip ag-grid angular9 ag-grid-angular


    【解决方案1】:

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

    尝试添加以下 CSS:

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

    !important 很重要,因为我们需要覆盖给tooltip-componentstyle

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

    【讨论】:

      猜你喜欢
      • 2019-07-03
      • 2020-05-14
      • 2020-09-23
      • 2020-05-30
      • 2020-12-02
      • 2021-04-27
      • 1970-01-01
      • 2020-01-02
      • 2021-12-01
      相关资源
      最近更新 更多