resizing column with pinned column broke table
(First thanks for your great work !) When you pin a column (to the left) and then increase the size of it, then the not pinned columns go under the pinned columns. you can try it on the tutoriel : http://ui-grid.info/docs/#/tutorial/401_AllFeatures
I noticed this bug as well -- I dug around a little bit: the crux of the problem has to do with this comment in uiGridPinningService:
//in uiGridPinningService:
// Need to call refresh twice; once to move our column over to the new render container and then
// a second time to update the grid viewport dimensions with our adjustments
col.grid.refresh()
.then(function () {
col.grid.refresh();
});
//in uiGridColumnResizer:
uiGridCtrl.grid.buildColumns()
.then(function() {
// Then refresh the grid canvas, rebuilding the styles so that the scrollbar updates its size
uiGridCtrl.grid.refreshCanvas(true);
});
inside the uiGridColumnResizer in the buildColumnsAndRefresh function the canvas is only refreshed once. If you refresh the grid twice as in the pinning service it works fine. I am not sure how performant this is or whether this is a sustainable solution (you would have to refresh twice anytime something changes the widths of the pinned container.
I've applied the fix as suggested. This does refresh twice, but only for people using resize, and only when the user manually resizes (i.e. not that frequently). I don't think the performance overhead will be material.