角UI的工具提示不NG-网格显示正确 [英] Angular-ui's tooltip does not display correctly in ng-grid

查看:104
本文介绍了角UI的工具提示不NG-网格显示正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一些时间显示在NG-格,但没有运气的工具提示的解决方案。当我用NG-电网cellTemplate定制的单元,包括我所经历的各种问题的工具提示 - 工具提示要么是没有显示出来或作为plunker所示举止异常:的 http://plnkr.co/edit/MFhwgOvSUFKcyJPse5wf

I've been searching for some time for a solution for displaying a tooltip on ng-grid but with no luck. When I use the cellTemplate on ng-grid for customizing the cell to include a tooltip I have experienced various problems - the tooltip is either not showing up or behaving strangely as shown in a plunker: http://plnkr.co/edit/MFhwgOvSUFKcyJPse5wf.

有我错过了什么?有没有人有在NG-电网很好地显示工具提示的解决方案?

Have I missed something? Does anyone have a solution for displaying tooltips nicely in ng-grid?

最好的问候。

推荐答案

由于我评论,这是一个一个NG-网格单元内的已知问题。我通过在列定义设置cellClass到这个固定的:

As I commented, this is a known issue inside an ng-grid cell. I fixed this by setting cellClass in the column definition to this:

cellClass: 'cellToolTip'

和CSS的:

.cellToolTip {
    overflow: visible;
}

这里是一个plunker 显示工具提示。然而,工具提示不定位完全正确。 :)

Here is a plunker that shows the tooltip. However, the tooltip is not positioned exactly right. :)

修改
添加此到 .tooltip 风格固定的定位问题,但我不知道为什么在我Plunker不得不这样做。在我自己的code,这是没有必要的:

EDIT: Adding this to the .tooltip style fixed the positioning problem, but I'm not sure why in Plunker I had to do this. In my own code, this was not necessary:

.tooltip {
  top: 0 !important;
}

下面是href=\"http://plnkr.co/edit/XcZvo7?p=$p$pview\">新plunker 是一个工作

Here is a new plunker that is working.

这篇关于角UI的工具提示不NG-网格显示正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆