From a6edfb498f171e141970a0b26981dda63f8d8ded Mon Sep 17 00:00:00 2001 From: Yogesh Mahajan Date: Tue, 17 Aug 2021 17:22:08 +0530 Subject: [PATCH] Partially fixes the data output panel display issue. Fixes #6572 --- docs/en_US/release_notes.rst | 1 + docs/en_US/release_notes_5_7.rst | 21 +++++++++++++++++++ .../tools/datagrid/static/js/datagrid.js | 4 ++++ .../tools/sqleditor/static/js/sqleditor.js | 12 +++++++++++ 4 files changed, 38 insertions(+) create mode 100644 docs/en_US/release_notes_5_7.rst diff --git a/docs/en_US/release_notes.rst b/docs/en_US/release_notes.rst index 78cdf149f..b7999adcb 100644 --- a/docs/en_US/release_notes.rst +++ b/docs/en_US/release_notes.rst @@ -11,6 +11,7 @@ notes for it. .. toctree:: :maxdepth: 1 + release_notes_5_7 release_notes_5_6 release_notes_5_5 release_notes_5_4 diff --git a/docs/en_US/release_notes_5_7.rst b/docs/en_US/release_notes_5_7.rst new file mode 100644 index 000000000..16d42d17c --- /dev/null +++ b/docs/en_US/release_notes_5_7.rst @@ -0,0 +1,21 @@ +************ +Version 5.7 +************ + +Release date: 2021-09-09 + +This release contains a number of bug fixes and new features since the release of pgAdmin4 5.6. + +New features +************ + + + +Housekeeping +************ + + +Bug fixes +********* + +| `Issue #6572 `_ - Fixed diff --git a/web/pgadmin/tools/datagrid/static/js/datagrid.js b/web/pgadmin/tools/datagrid/static/js/datagrid.js index cee68da73..27b519928 100644 --- a/web/pgadmin/tools/datagrid/static/js/datagrid.js +++ b/web/pgadmin/tools/datagrid/static/js/datagrid.js @@ -289,6 +289,10 @@ define('pgadmin.datagrid', [ }); }); + queryToolPanel.on(wcDocker.EVENT.VISIBILITY_CHANGED, function() { + queryToolPanel.trigger(wcDocker.EVENT.RESIZED); + }); + commonUtils.registerDetachEvent(queryToolPanel); // Listen on the panelRename event. diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index 84fdafbb3..37f76e687 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -1418,6 +1418,18 @@ define('tools.querytool', [ } }); + self.data_output_panel.on(wcDocker.EVENT.RESIZED, function() { + // Resize grid only when 'Data Output' panel is visible. + if (self.data_output_panel.isVisible()) { + if (self.preferences.column_data_auto_resize === 'by_data') { + grid.resizeAllColumns && grid.resizeAllColumns( + self.preferences.column_data_max_width, self.max_width_changed); + }else{ + self.grid.resizeAllColumns && self.grid.resizeAllColumns(); + } + } + }); + // Resize SlickGrid when output Panel gets focus self.data_output_panel.on(wcDocker.EVENT.VISIBILITY_CHANGED, function() { // Resize grid only if output panel is visible