Support double-click on Query Tool result grid column resize handles to auto-size to the content. Fixes #4034

This commit is contained in:
Aditya Toshniwal
2019-02-26 13:44:16 +00:00
committed by Dave Page
parent 1770c94b07
commit 9c5b9364b6
5 changed files with 170 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ define('tools.querytool', [
'backgrid.sizeable.columns',
'slick.pgadmin.formatters',
'slick.pgadmin.editors',
'slick.pgadmin.plugins/slick.autocolumnsize',
'pgadmin.browser',
'pgadmin.tools.user_management',
], function(
@@ -863,6 +864,7 @@ define('tools.querytool', [
grid.registerPlugin(new ActiveCellCapture());
grid.setSelectionModel(new XCellSelectionModel());
grid.registerPlugin(gridSelector);
grid.registerPlugin(new Slick.AutoColumnSize());
var headerButtonsPlugin = new Slick.Plugins.HeaderButtons();
headerButtonsPlugin.onCommand.subscribe(function (e, args) {
let command = args.command;
@@ -926,7 +928,7 @@ define('tools.querytool', [
var column_size = self.handler['col_size'];
column_size[self.handler['table_name']][col['id']] = col['width'];
});
});
}.bind(grid));
gridSelector.onBeforeGridSelectAll.subscribe(function(e, args) {
if (self.handler.has_more_rows) {