Skip to content

Commit 37ad3d7

Browse files
committed
Fixed coderabbitai review comments
1 parent a38cd79 commit 37ad3d7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,13 +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);
1499+
const gvColumnsSignature = React.useMemo(() => columns.map(c => c.key).join(','), [columns]);
1500+
15001501
const openGeometryViewerTab = React.useCallback((column, rowsData) => {
1501-
gvRenderKeyRef.current++;
15021502
layoutDocker.openTab({
15031503
id: PANELS.GEOMETRY,
15041504
title: gettext('Geometry Viewer'),
1505-
content: <GeometryViewer key={gvRenderKeyRef.current} rows={rowsData} columns={columns} column={column}/>,
1505+
content: <GeometryViewer key={gvColumnsSignature} rows={rowsData} columns={columns} column={column}/>,
15061506
closable: true,
15071507
}, PANELS.MESSAGES, 'after-tab', true);
15081508
}, [layoutDocker, columns]);

0 commit comments

Comments
 (0)