angular-ui/ui-grid
Voir sur GitHubcolumnWidth not correctly computed if table initialized hidden
Open
#6 090 ouverte le 17 mars 2017
good first issueworkaround
Métriques du dépôt
- Stars
- (5 395 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
brief desc:
condition: width is not fixed px but %,
result: columnWidth not correctly computed if table initialized hidden and then click somewhere to show it
steps:
- html like this:
<div ng-show='table.show'><div ui-grid='table.option' style="width: 100%"></div></div> <a ng-click='table.click()'></a>
2 .js
$scope.table={ show: false, option:{ .... }, click:function(){this.show = true} }
- result: columnWidth value is NaN so that all the width defined in columnDefs doesn't work, the table css looks not correct, and api.core.refresh() doesn't make things work right.
- if the initial value of table.show is true, everything works fine.