Skip to content

Commit

Permalink
fix(pinning): put back vertical scroll on grid after removing freezing (
Browse files Browse the repository at this point in the history
#581)

* fix(pinning): put back vertical scroll on grid after removing freezing
  • Loading branch information
ghiscoding committed Sep 17, 2020
1 parent f2059a2 commit f07ff75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ describe('gridMenuExtension', () => {

expect(onCommandSpy).toHaveBeenCalled();
expect(setColumnsSpy).toHaveBeenCalled();
expect(setOptionsSpy).toHaveBeenCalledWith({ frozenColumn: -1 });
expect(setOptionsSpy).toHaveBeenCalledWith({ frozenColumn: -1, alwaysShowVerticalScroll: true });
});

it('should call "clearFilters" and dataview refresh when the command triggered is "clear-filter"', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ export class GridMenuExtension implements Extension {
switch (args.command) {
case 'clear-frozen-columns':
const visibleColumns = [...this.sharedService.visibleColumns];
this.sharedService.grid.setOptions({ frozenColumn: -1 });
const showVerticalScroll = this.sharedService.gridOptions && this.sharedService.gridOptions.enableGridMenu || false;
this.sharedService.grid.setOptions({ frozenColumn: -1, alwaysShowVerticalScroll: showVerticalScroll });
if (Array.isArray(visibleColumns) && Array.isArray(this.sharedService.allColumns) && visibleColumns.length !== this.sharedService.allColumns.length) {
this.sharedService.grid.setColumns(visibleColumns);
}
Expand Down

0 comments on commit f07ff75

Please sign in to comment.