[英]Angular UI-Grid: Hover on expandable row
这是我所做的:
在表格的右侧,我将以下内容添加到了单元格模板中:
<div class="ui-grid-cell-contents"
ng-class="{ 'ui-grid-cell-hover': (grid.appScope.hoverRow == row.uid) }"
ng-mouseenter="grid.appScope.hoverRow = row.uid"
ng-mouseleave="grid.appScope.hoverRow = undefined">
为了覆盖左侧部分,我更改了expandableRowHeader模板(在模板缓存中,因为它没有在外部公开):
<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell">
<div class="ui-grid-cell-contents"
ng-class="{'ui-grid-cell-hover': (grid.appScope.hoverRow == row.uid)}"
ng-mouseenter="grid.appScope.hoverRow = row.uid"
ng-mouseleave="grid.appScope.hoverRow = undefined">
...
</div>
</div>
我不喜欢这种解决方案。 首先,我不喜欢修补第三方组件。 其次,悬停反应缓慢:在悬停和颜色更改之间需要半秒钟。
因此,如果有人有更好的解决方案,请在此处发布。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.