fix: Fix parameter inputField ref not yet mounted (no-changelog) (#5864)

* fix: fix parameter inputField ref not yet mounted

* fix: move optional chaining

* fix: fix focus condition
This commit is contained in:
Alex Grozav 2023-03-31 15:59:54 +03:00 committed by GitHub
parent 0a59002ef8
commit 97b35daf0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -961,7 +961,7 @@ export default mixins(
// Set focus on field
setTimeout(() => {
// @ts-ignore
if (this.$refs.inputField && this.$refs.inputField.$el) {
if (this.$refs.inputField?.focus && this.$refs.inputField?.$el) {
// @ts-ignore
this.$refs.inputField.focus();
this.isFocused = true;