fix(editor-ui): Fix ParameterInput inputField ref focus (#4215)

* fix(editor-ui): Fix ParameterInput inputField ref focus

* 🐛 Add focus method for `CredentialsSelect` and revert previous change to `ParamterInput`
This commit is contained in:
OlegIvaniv
2022-09-28 09:46:38 +02:00
committed by GitHub
parent 6ac442a2ac
commit ed403972a9

View File

@@ -7,6 +7,7 @@
:value="displayValue" :value="displayValue"
:placeholder="parameter.placeholder ? getPlaceholder() : $locale.baseText('parameterInput.select')" :placeholder="parameter.placeholder ? getPlaceholder() : $locale.baseText('parameterInput.select')"
:title="displayTitle" :title="displayTitle"
ref="innerSelect"
@change="(value) => $emit('valueChanged', value)" @change="(value) => $emit('valueChanged', value)"
@keydown.stop @keydown.stop
@focus="$emit('setFocus')" @focus="$emit('setFocus')"
@@ -82,6 +83,12 @@ export default Vue.extend({
}, },
}, },
methods: { methods: {
focus() {
const select = this.$refs.innerSelect as Vue & HTMLElement | undefined;
if (select) {
select.focus();
}
},
/** /**
* Check if a credential type belongs to one of the supported sets defined * Check if a credential type belongs to one of the supported sets defined
* in the `credentialTypes` key in a `credentialsSelect` parameter * in the `credentialTypes` key in a `credentialsSelect` parameter