Skip to content

Commit

Permalink
fix(ui): improved the editor behaviour on switching views (#4667)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored and loicmathieu committed Aug 22, 2024
1 parent 8181729 commit f1ce76f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/src/components/inputs/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
if (!this.fullHeight) {
editor.onDidContentSizeChange(e => {
if(!this.$refs.container) return;
this.$refs.container.style.height = (e.contentHeight + this.customHeight) + "px";
});
}
Expand Down
10 changes: 9 additions & 1 deletion ui/src/components/inputs/EditorView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,14 @@
haveChange.value = true;
store.dispatch("core/isUnsaved", true);
store.commit("editor/changeOpenedTabs", {
action: "dirty",
...currentTab.value,
name: currentTab.value?.name ?? "Flow",
path: currentTab.value?.path ?? "Flow.yaml",
dirty: true
});
clearTimeout(timer.value);
if(!isFlow) return;
Expand Down Expand Up @@ -611,7 +619,7 @@
) {
isHorizontal.value = isHorizontalDefault();
if (updatedFromEditor.value) {
onEdit(flowYaml.value);
onEdit(flowYaml.value, true);
updatedFromEditor.value = false;
}
}
Expand Down

0 comments on commit f1ce76f

Please sign in to comment.