diff --git a/docs/en_US/release_notes_9_11.rst b/docs/en_US/release_notes_9_11.rst index a12da8058..77a0fb2d8 100644 --- a/docs/en_US/release_notes_9_11.rst +++ b/docs/en_US/release_notes_9_11.rst @@ -36,5 +36,7 @@ Bug fixes | `Issue #9297 `_ - Fixed an issue where EXPLAIN should run on query under cursor if no text is selected. | `Issue #9351 `_ - Fixed an issue where opening file in Query Tool does not retain file name in tab. | `Issue #9354 `_ - Fixed an issue where connection is failing via Query Tool/PSQL Tool workspaces. - | `Issue #9393 `_ - Fixed the Helm chart server definition and changed the app version. + | `Issue #9354 `_ - Fixed an issue where connection is failing via Query Tool/PSQL Tool workspaces. + | `Issue #9372 `_ - Fixed an issue where copying highlighted text in the query tool data output cell editor would copy the complete string. + | `Issue #9373 `_ - Fixed an issue where copying a single cell should not add quoting. | `Issue #9408 `_ - Ensure the proper handling of extra volume mount configurations in the Helm deployment template by correcting the configuration value references. diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/CopyData.js b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/CopyData.js index 216921047..cc2e0b869 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/CopyData.js +++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/CopyData.js @@ -29,9 +29,10 @@ export default class CopyData { } copyRowsToCsv(rows=[], columns=[], withHeaders=false) { + const isSingleCell = rows.length === 1 && columns.length === 1 && !withHeaders; let csvRows = rows.reduce((prevCsvRows, currRow)=>{ let csvRow = columns.reduce((prevCsvCols, column)=>{ - prevCsvCols.push(this.csvCell(currRow[column.key], column)); + prevCsvCols.push(this.csvCell(currRow[column.key], column, false, isSingleCell)); return prevCsvCols; }, []).join(this.CSVOptions.field_separator); prevCsvRows.push(csvRow); @@ -80,11 +81,13 @@ export default class CopyData { return value; } - csvCell(value, column, header=false) { - if (this.CSVOptions.quoting == 'all' || header) { - value = this.allQuoteCell(value); + csvCell(value, column, header, isSingleCell=false) { + if(isSingleCell) { + return value; + } else if (this.CSVOptions.quoting == 'all' || header) { + return this.allQuoteCell(value); } else if(this.CSVOptions.quoting == 'strings') { - value = this.stringQuoteCell(value, column); + return this.stringQuoteCell(value, column); } return value; } diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/index.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/index.jsx index e71cd78ab..518190fd5 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/index.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/index.jsx @@ -459,8 +459,6 @@ export default function QueryToolDataGrid({columns, rows, totalRowCount, dataCha rowHeight={25} mincolumnWidthBy={50} enableCellSelect={true} - onCopy={handleCopy} - onMultiCopy={handleCopy} onColumnResize={handleColumnResize} renderers={{ renderRow: renderCustomRow, diff --git a/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py b/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py index 7401b258d..28ab1fd5a 100644 --- a/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py +++ b/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py @@ -265,7 +265,7 @@ def register_query_tool_preferences(self): self.results_grid_quote_char = self.preference.register( 'Results_grid', 'results_grid_quote_char', - gettext("Result copy quote character"), 'options', '"', + gettext("Result copy quote character. Not applied when copying a single cell."), 'options', '"', category_label=PREF_LABEL_RESULTS_GRID, options=[{'label': '"', 'value': '"'}, {'label': '\'', 'value': '\''}],