Fixed an issue with rendering geometry when selecting a complete column. Fixes #7586

pull/90/head
Yogesh Mahajan 2022-08-09 13:28:09 +05:30 committed by Akshay Joshi
parent 8c24d28740
commit f96653e9af
2 changed files with 6 additions and 2 deletions

View File

@ -27,3 +27,4 @@ Bug fixes
| `Issue #7527 <https://redmine.postgresql.org/issues/7527>`_ - Fixed API test cases for Postgres 14.4.
| `Issue #7563 <https://redmine.postgresql.org/issues/7563>`_ - Fixed an issue where autocomplete is not working after clearing the query editor.
| `Issue #7573 <https://redmine.postgresql.org/issues/7573>`_ - Ensure that autocomplete does not appear when navigating code using arrow keys.
| `Issue #7586 <https://redmine.postgresql.org/issues/7586>`_ - Fixed an issue with rendering geometry when selecting a complete column.

View File

@ -989,7 +989,7 @@ export function ResultSet() {
try {
/* Convert the added info to actual rows */
let added = {...dataChangeStore.added};
Object.keys(added).map((clientPK)=>{
Object.keys(added).forEach((clientPK)=>{
added[clientPK].data = _.find(rows, (r)=>rowKeyGetter(r)==clientPK);
});
let {data: respData} = await rsu.current.saveData({
@ -1214,6 +1214,9 @@ export function ResultSet() {
let selRowsData = rows;
if(selectedRows.size != 0) {
selRowsData = rows.filter((r)=>selectedRows.has(rowKeyGetter(r)));
} else if(selectedColumns.size > 0) {
let selectedCols = _.filter(columns, (_c, i)=>selectedColumns.has(i+1));
selRowsData = _.map(rows, (r)=>_.pick(r, _.map(selectedCols, (c)=>c.key)));
} else if(selectedRange.current) {
let [,, startRowIdx, endRowIdx] = getRangeIndexes();
selRowsData = rows.slice(startRowIdx, endRowIdx+1);
@ -1229,7 +1232,7 @@ export function ResultSet() {
};
eventBus.registerListener(QUERY_TOOL_EVENTS.TRIGGER_RENDER_GEOMETRIES, renderGeometries);
return ()=>eventBus.deregisterListener(QUERY_TOOL_EVENTS.TRIGGER_RENDER_GEOMETRIES, renderGeometries);
}, [rows, columns, selectedRows.size]);
}, [rows, columns, selectedRows.size, selectedColumns.size]);
const handleScroll = (e)=>{
if (isLoadingMore || !rsu.current.isAtBottom(e)) return;