Skip to content

Commit

Permalink
fix(editor): Auto-focus expression input when switching from "fixed" …
Browse files Browse the repository at this point in the history
…mode (#10686)
  • Loading branch information
OlegIvaniv authored Sep 6, 2024
1 parent 62cb189 commit 54ab2b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/editor-ui/src/components/ParameterInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,14 @@ watch(remoteParameterOptionsLoading, () => {
tempValue.value = displayValue.value as string;
});
// Focus input field when changing from fixed value to expression
watch(isModelValueExpression, async (isExpression, wasExpression) => {
if (isExpression && !wasExpression) {
await nextTick();
inputField.value?.focus();
}
});
onUpdated(async () => {
await nextTick();
Expand Down

0 comments on commit 54ab2b1

Please sign in to comment.