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
  • Loading branch information
OlegIvaniv committed Sep 5, 2024
1 parent aa98c18 commit 70fd576
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 70fd576

Please sign in to comment.