Skip to content

Commit

Permalink
fix(pinning): blank space between pinnedRight column and the last unp…
Browse files Browse the repository at this point in the history
…inned column

Change the order of conditionals to remove blank space between the last
unpinned column and the pinned right column in order to fix the
availableWidth behavior

This commit fixes angular-ui#4949 (pull angular-ui#6284)
  • Loading branch information
jpcleite committed Dec 27, 2022
1 parent 1332174 commit 4d195c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/js/factories/GridRenderContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,14 +601,14 @@ angular.module('ui.grid')
// Skip hidden columns
if (!column.visible) { return; }

if (pinRightColumn) {
availableWidth += self.grid.scrollbarWidth;
}

if (!pinRightColumn && column.colDef.pinnedRight) {
pinRightColumn = true;
}

if (pinRightColumn) {
availableWidth += self.grid.scrollbarWidth;
}

if (angular.isNumber(column.width)) {
// pixel width, set to this value
if (column.colDef.allowFloatWidth) {
Expand Down

0 comments on commit 4d195c5

Please sign in to comment.