Skip to content

Commit

Permalink
fix: fix workflow watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgrozav committed Apr 26, 2024
1 parent 5c9e85e commit 3032059
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const isWorkflowHistoryButtonDisabled = computed(() => {
});
watch(
() => props.workflow,
() => props.workflow.id,
() => {
isTagsEditEnabled.value = false;
isNameEditEnabled.value = false;
Expand Down Expand Up @@ -311,11 +311,12 @@ function onNameToggle() {
async function onNameSubmit({
name,
onSubmit: cb,
onSubmit,
}: {
name: string;
onSubmit: (saved: boolean) => void;
}) {
console.log(onSubmit);
const newName = name.trim();
if (!newName) {
toast.showMessage({
Expand All @@ -324,14 +325,14 @@ async function onNameSubmit({
type: 'error',
});
cb(false);
onSubmit(false);
return;
}
if (newName === props.workflow.name) {
isNameEditEnabled.value = false;
cb(true);
onSubmit(true);
return;
}
Expand All @@ -341,7 +342,7 @@ async function onNameSubmit({
isNameEditEnabled.value = false;
}
uiStore.removeActiveAction('workflowSaving');
cb(saved);
onSubmit(saved);
}
async function handleFileImport(): Promise<void> {
Expand Down

0 comments on commit 3032059

Please sign in to comment.