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 and riascho committed Sep 23, 2024
1 parent 847f6ff commit 1376868
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 1376868

Please sign in to comment.