Skip to content

Commit

Permalink
fix(ui): tabs are being cleared on flow creation (#4085)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored Jun 20, 2024
1 parent 6efe80a commit 8370798
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/src/components/flows/FlowCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<script>
import EditorView from "../inputs/EditorView.vue";
import {mapGetters, mapState} from "vuex";
import {mapGetters, mapState, mapMutations} from "vuex";
import RouteContext from "../../mixins/routeContext";
import TopNavBar from "../../components/layout/TopNavBar.vue";
import {apiUrl} from "override/utils/route";
Expand All @@ -44,11 +44,15 @@
this.$tours["guidedTour"]?.start();
}
this.setupFlow()
this.closeAllTabs()
},
beforeUnmount() {
this.$store.commit("flow/setFlowValidation", undefined);
},
methods: {
...mapMutations("editor", ["closeAllTabs"]),
async queryBlueprint(blueprintId) {
return (await this.$http.get(`${this.blueprintUri}/${blueprintId}/flow`)).data;
},
Expand Down
4 changes: 4 additions & 0 deletions ui/src/stores/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,9 @@ export default {
state.tabs = [state.tabs[0]];
}
},
closeAllTabs(state) {
state.tabs = [];
state.current = undefined
},
},
};

0 comments on commit 8370798

Please sign in to comment.