Skip to content

Commit

Permalink
fix(ui): improve modifying inputs from no code editor (#7440)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic committed Feb 18, 2025
1 parent 2215151 commit 146b17d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 3 additions & 3 deletions ui/src/components/flows/MetadataInputs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
@click="selectInput(input, index)"
>
<el-col :span="24" class="d-flex">
<InputText disabled :model-value="input.id" class="w-100" />
<InputText readonly :model-value="input.id" class="w-100" />
<DeleteOutline
@click.prevent.stop="deleteInput(index)"
class="ms-2 delete"
/>
</el-col>
</el-row>
<Add @add="addInput(index)" />
<Add @add="addInput()" />
</div>
</template>

Expand Down Expand Up @@ -127,7 +127,7 @@
},
addInput() {
this.newInputs.push({type: "STRING"});
this.selectInput(this.newInputs.at(-1), 0);
this.selectInput(this.newInputs.at(-1), this.newInputs.length - 1);
},
onChangeType(value) {
this.loading = true;
Expand Down
10 changes: 3 additions & 7 deletions ui/src/components/flows/MetadataInputsContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,10 @@
addInput() {
this.newInputs.push({type: "STRING"});
},
onChangeType(value) {
onChangeType(type) {
this.loading = true;
this.selectedInput = {
type: value,
id: this.newInputs[this.selectedIndex].id,
};
this.newInputs[this.selectedIndex] = this.selectedInput;
this.loadSchema(value);
this.newInputs[this.selectedIndex].type = type;
this.loadSchema(type);
},
},
};
Expand Down

0 comments on commit 146b17d

Please sign in to comment.