mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat: Replace this.$refs.refName as Vue with InstanceType<T> (no-changelog) (#6050)
* refactor: use InstanceType<T> for all this.$refs types * refactor: update refs type in N8nSelect * fix: remove inputRef non-null assertion Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> * fix: remove non-null assertion --------- Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>
This commit is contained in:
@@ -79,6 +79,8 @@ import { EXPRESSIONS_DOCS_URL } from '@/constants';
|
||||
import type { Segment } from '@/types/expressions';
|
||||
import type { TargetItem } from '@/Interface';
|
||||
|
||||
type InlineExpressionEditorInputRef = InstanceType<typeof InlineExpressionEditorInput>;
|
||||
|
||||
export default Vue.extend({
|
||||
name: 'ExpressionParameterInput',
|
||||
components: {
|
||||
@@ -127,9 +129,10 @@ export default Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
focus() {
|
||||
const inlineInput = this.$refs.inlineInput as (Vue & HTMLElement) | undefined;
|
||||
|
||||
if (inlineInput?.$el) inlineInput.focus();
|
||||
const inlineInputRef = this.$refs.inlineInput as InlineExpressionEditorInputRef | undefined;
|
||||
if (inlineInputRef?.$el) {
|
||||
inlineInputRef.focus();
|
||||
}
|
||||
},
|
||||
onFocus() {
|
||||
this.isFocused = true;
|
||||
|
||||
Reference in New Issue
Block a user