Skip to content

Commit 6fab59a

Browse files
Ensure the generate script button in schema diff populates diff query in query tool.
1 parent 03f18d5 commit 6fab59a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,12 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
283283
eventBus.current.fireEvent(QUERY_TOOL_EVENTS.HANDLE_API_ERROR, err);
284284
setQtStatePartial({ editor_disabled: true });
285285
});
286+
} else if (qtState.params.sql_id) {
287+
let sqlValue = localStorage.getItem(qtState.params.sql_id);
288+
localStorage.removeItem(qtState.params.sql_id);
289+
if (sqlValue) {
290+
eventBus.current.fireEvent(QUERY_TOOL_EVENTS.EDITOR_SET_SQL, sqlValue);
291+
}
286292
} else if (qtState.params.toolDataId) {
287293
populateEditorData();
288294
} else {

0 commit comments

Comments
 (0)