ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

pinnedRight adding an extra blank column

Open AnirudhaGohokar opened this issue 10 years ago • 4 comments

Hi,

Setting pinnedRight to true is adding an extra blank column to its left. Here's a plunker for reference: http://plnkr.co/edit/h3TzNPIhFp6BsV4C3PHE?p=preview

Thanks, Anirudha

AnirudhaGohokar avatar Jan 12 '16 07:01 AnirudhaGohokar

Hi, I have the same issue, it can be quick fixed by modifying the margin of the concerned column but it's not quite elegant....

zakerby avatar Nov 30 '16 09:11 zakerby

Hi, I did solved this problem by making certain changes in the updateColumnWidths function of GridRenderContainer. All I have done is added a new variable to find out if there is atleast one pinnedRightColumn is available. If its there, I have just added the scrollbarWidth(which is the exact size of whitespace / extra blank column) to the available width before processColumnUpwards and processColumnDownwards so that white space will be filled up with the columns during auto width specification.

//This is inside iterating for each column if (!pinRightColumn && column.colDef.pinnedRight) { pinRightColumn = true; } //Before if(pinRightColumn) { availableWidth += self.grid.scrollbarWidth; }

I am not quite sure this is correct solution or not, but this does the trick for me and has overwritten that API into my project.

Adding my comment to know whether this is proper fix or not. Can anyone validate this approach, so that I can make a pull request into master.

mani301 avatar Apr 25 '17 09:04 mani301

Looks like this fix is not in the current version (v4.0.6). It would be great to have a new version (4.0.7?), so it'd be fixed for everyone.

ghost avatar Sep 19 '17 07:09 ghost

Still experiencing this issue on ui-grid - v4.4.11 - 2018-05-16

Truedison avatar Jun 26 '18 07:06 Truedison