fix(editor): Auto-focus expression input when switching from "fixed" mode (#10686)

This commit is contained in:
oleg 2024-09-06 09:17:46 +02:00 committed by GitHub
parent 62cb189985
commit 54ab2b14e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -941,6 +941,14 @@ watch(remoteParameterOptionsLoading, () => {
tempValue.value = displayValue.value as string; 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 () => { onUpdated(async () => {
await nextTick(); await nextTick();