This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new e8af945 Update query tab's title when saving a new query (#8484)
e8af945 is described below
commit e8af9459ab5a85473176d3cdac533e02828274e0
Author: Paul Vickers <[email protected]>
AuthorDate: Mon Nov 4 23:39:33 2019 -0800
Update query tab's title when saving a new query (#8484)
* Update query tab's title when saving a new query
Just like it does when you opt to update an existing query
* Remove trailing whitespace
---
superset/assets/src/SqlLab/reducers/sqlLab.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/superset/assets/src/SqlLab/reducers/sqlLab.js
b/superset/assets/src/SqlLab/reducers/sqlLab.js
index 1d0715a..3424bda 100644
--- a/superset/assets/src/SqlLab/reducers/sqlLab.js
+++ b/superset/assets/src/SqlLab/reducers/sqlLab.js
@@ -42,7 +42,10 @@ export default function sqlLabReducer(state = {}, action) {
[actions.QUERY_EDITOR_SAVED]() {
const { query, result } = action;
const existing = state.queryEditors.find(qe => qe.id === query.id);
- return alterInArr(state, 'queryEditors', existing, { remoteId:
result.remoteId }, 'id');
+ return alterInArr(state, 'queryEditors', existing, {
+ remoteId: result.remoteId,
+ title: query.title,
+ }, 'id');
},
[actions.UPDATE_QUERY_EDITOR]() {
const id = action.alterations.remoteId;