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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,7 @@
:value="displayValue"
:placeholder="parameter.placeholder ? getPlaceholder() : $locale.baseText('parameterInput.select')"
:title="displayTitle"
ref="innerSelect"
@change="(value) => $emit('valueChanged', value)"
@keydown.stop
@focus="$emit('setFocus')"
@ -82,6 +83,12 @@ export default Vue.extend({
},
},
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
* in the `credentialTypes` key in a `credentialsSelect` parameter