angular-ui/ui-grid

100% width with grids and tabs

已关闭

#6,777 创建于 2018年6月27日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (2,496 个派生)batch import
help wanted

仓库指标

星标
 (5,395 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

This is a bit tricky to replicate, but I'll update the issue with a plunkr if I manage to get it.

I have 3 tabs (bootstrap library - uib-tab) with a grid in each and css with width: 100%. The horizontal scrolling sometimes is out of sync (i.e. header doesn't scroll but rows do) and seems quite similar to #2592. I don't think it's the same because when I look at the DOM in Chrome Dev Tools, I notice that the "broken" grid has .ui-grid-viewport { width: 100%0px; ... } which obviously doesn't work and seems to be the issue.

I'm not entirely sure why this happens. It seems like a bit of a race condition. I'm calling gridApi.core.refresh() and gridApi.core.handleWindowResize() on tab change, but it's not helping.

贡献者指南