-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(uiGridHeader): Fix dynamic header heights
Previously header cell heights were calculated based on a "max height is king" algorithm where cells could grow to match the largest height, but could never shrink, e.g. this let cells with no filter box be the same height as those with no filter box. This presented a problem with toggling features like filtering. If suddenly no columns were filterable this would leave a big empty space at the bottom of each header cell. This change makes header cells display-type "table-cell", which lets them render like a TD with full height, and places them in table-row and table divs. Replacing "width" with "min-width" and "max-width" forces the header cells to be the correct width. Also the `columnStyle` method has been replaced with a `columnWrapperStyle` method.
- Loading branch information
Showing
8 changed files
with
47 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
<div class="ui-grid-footer-panel ui-grid-footer-aggregates-row"> | ||
<div class="ui-grid-footer ui-grid-footer-viewport"> | ||
<div class="ui-grid-footer-canvas"> | ||
<div ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" ui-grid-footer-cell col="col" render-index="$index" class="ui-grid-footer-cell ui-grid-clearfix" ng-style="$index === 0 && colContainer.columnStyle($index)"></div> | ||
<div class="ui-grid-footer ui-grid-footer-viewport"> | ||
<div class="ui-grid-footer-canvas"> | ||
<div class="ui-grid-footer-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()"> | ||
<div class="ui-grid-footer-cell-row"> | ||
<div ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" ui-grid-footer-cell col="col" render-index="$index" class="ui-grid-footer-cell ui-grid-clearfix"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters