[英]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.