mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that geometry should be shown for all the selected cells. Fixes #7519
This commit is contained in:
committed by
Akshay Joshi
parent
a11f42b3e0
commit
1fecf70123
@@ -26,5 +26,6 @@ Bug fixes
|
|||||||
| `Issue #7471 <https://redmine.postgresql.org/issues/7471>`_ - Ensure that the splash screen can be moved.
|
| `Issue #7471 <https://redmine.postgresql.org/issues/7471>`_ - Ensure that the splash screen can be moved.
|
||||||
| `Issue #7517 <https://redmine.postgresql.org/issues/7517>`_ - Enable the start debugging button once execution is completed.
|
| `Issue #7517 <https://redmine.postgresql.org/issues/7517>`_ - Enable the start debugging button once execution is completed.
|
||||||
| `Issue #7518 <https://redmine.postgresql.org/issues/7518>`_ - Ensure that dashboard graph API is not called after the panel has been closed.
|
| `Issue #7518 <https://redmine.postgresql.org/issues/7518>`_ - Ensure that dashboard graph API is not called after the panel has been closed.
|
||||||
|
| `Issue #7519 <https://redmine.postgresql.org/issues/7519>`_ - Ensure that geometry should be shown for all the selected cells.
|
||||||
| `Issue #7522 <https://redmine.postgresql.org/issues/7522>`_ - Added support for Azure PostgreSQL deployment in server mode.
|
| `Issue #7522 <https://redmine.postgresql.org/issues/7522>`_ - Added support for Azure PostgreSQL deployment in server mode.
|
||||||
| `Issue #7523 <https://redmine.postgresql.org/issues/7523>`_ - Fixed typo error for Statistics on the table header.
|
| `Issue #7523 <https://redmine.postgresql.org/issues/7523>`_ - Fixed typo error for Statistics on the table header.
|
||||||
|
|||||||
@@ -1085,6 +1085,14 @@ export function ResultSet() {
|
|||||||
return ()=>eventBus.deregisterListener(QUERY_TOOL_EVENTS.TRIGGER_SAVE_DATA, triggerSaveData);
|
return ()=>eventBus.deregisterListener(QUERY_TOOL_EVENTS.TRIGGER_SAVE_DATA, triggerSaveData);
|
||||||
}, [dataChangeStore, rows, columns]);
|
}, [dataChangeStore, rows, columns]);
|
||||||
|
|
||||||
|
const getRangeIndexes = ()=>{
|
||||||
|
let startColumnIdx = Math.min(selectedRange.current.startColumnIdx, selectedRange.current.endColumnIdx);
|
||||||
|
let endColumnIdx = Math.max(selectedRange.current.startColumnIdx, selectedRange.current.endColumnIdx);
|
||||||
|
let startRowIdx = Math.min(selectedRange.current.startRowIdx, selectedRange.current.endRowIdx);
|
||||||
|
let endRowIdx = Math.max(selectedRange.current.startRowIdx, selectedRange.current.endRowIdx);
|
||||||
|
return [startColumnIdx, endColumnIdx, startRowIdx, endRowIdx];
|
||||||
|
};
|
||||||
|
|
||||||
const copyDataFunc = (withHeaders=false)=>{
|
const copyDataFunc = (withHeaders=false)=>{
|
||||||
const queryToolPref = queryToolCtx.preferences.sqleditor;
|
const queryToolPref = queryToolCtx.preferences.sqleditor;
|
||||||
let copyData = new CopyData({
|
let copyData = new CopyData({
|
||||||
@@ -1101,10 +1109,7 @@ export function ResultSet() {
|
|||||||
copyCols = _.filter(columns, (_c, i)=>selectedColumns.has(i+1));
|
copyCols = _.filter(columns, (_c, i)=>selectedColumns.has(i+1));
|
||||||
copyRows = _.map(rows, (r)=>_.pick(r, _.map(copyCols, (c)=>c.key)));
|
copyRows = _.map(rows, (r)=>_.pick(r, _.map(copyCols, (c)=>c.key)));
|
||||||
} else if(selectedRange.current) {
|
} else if(selectedRange.current) {
|
||||||
let startColumnIdx = Math.min(selectedRange.current.startColumnIdx, selectedRange.current.endColumnIdx);
|
let [startColumnIdx, endColumnIdx, startRowIdx, endRowIdx] = getRangeIndexes();
|
||||||
let endColumnIdx = Math.max(selectedRange.current.startColumnIdx, selectedRange.current.endColumnIdx);
|
|
||||||
let startRowIdx = Math.min(selectedRange.current.startRowIdx, selectedRange.current.endRowIdx);
|
|
||||||
let endRowIdx = Math.max(selectedRange.current.startRowIdx, selectedRange.current.endRowIdx);
|
|
||||||
copyCols = _.filter(columns, (_c, i)=>{
|
copyCols = _.filter(columns, (_c, i)=>{
|
||||||
/* Row num col is added by QueryDataGrid, index will be +1 */
|
/* Row num col is added by QueryDataGrid, index will be +1 */
|
||||||
let idx = i+1;
|
let idx = i+1;
|
||||||
@@ -1209,6 +1214,9 @@ export function ResultSet() {
|
|||||||
let selRowsData = rows;
|
let selRowsData = rows;
|
||||||
if(selectedRows.size != 0) {
|
if(selectedRows.size != 0) {
|
||||||
selRowsData = rows.filter((r)=>selectedRows.has(rowKeyGetter(r)));
|
selRowsData = rows.filter((r)=>selectedRows.has(rowKeyGetter(r)));
|
||||||
|
} else if(selectedRange.current) {
|
||||||
|
let [,, startRowIdx, endRowIdx] = getRangeIndexes();
|
||||||
|
selRowsData = rows.slice(startRowIdx, endRowIdx+1);
|
||||||
} else if(selectedCell.current[0]) {
|
} else if(selectedCell.current[0]) {
|
||||||
selRowsData = [selectedCell.current[0]];
|
selRowsData = [selectedCell.current[0]];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user