Skip to content

Commit a38cd79

Browse files
committed
Fixed Geometry Viewer not auto-updating on first query execution after View/Edit Data to Query Tool promotion. #9392
1 parent 2576548 commit a38cd79

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • web/pgadmin/tools/sqleditor/static/js/components/sections

web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,11 +1496,13 @@ export function ResultSet() {
14961496
return ()=>eventBus.deregisterListener(QUERY_TOOL_EVENTS.TRIGGER_ADD_ROWS, triggerAddRows);
14971497
}, [columns, selectedRows.size]);
14981498

1499+
const gvRenderKeyRef = useRef(0);
14991500
const openGeometryViewerTab = React.useCallback((column, rowsData) => {
1501+
gvRenderKeyRef.current++;
15001502
layoutDocker.openTab({
15011503
id: PANELS.GEOMETRY,
15021504
title: gettext('Geometry Viewer'),
1503-
content: <GeometryViewer rows={rowsData} columns={columns} column={column}/>,
1505+
content: <GeometryViewer key={gvRenderKeyRef.current} rows={rowsData} columns={columns} column={column}/>,
15041506
closable: true,
15051507
}, PANELS.MESSAGES, 'after-tab', true);
15061508
}, [layoutDocker, columns]);

0 commit comments

Comments
 (0)