fix: Fix RLC and select dropdown styling and functionality (no-changelog) (#6809)

* fix: fix RLC and select dropdown styling and functionality

* fix: change setTimeout to nextTick

* fix: fix resource locator padding
This commit is contained in:
Alex Grozav
2023-08-01 17:58:25 +03:00
committed by GitHub
parent 24ce141815
commit 88156deb5c
4 changed files with 60 additions and 33 deletions

View File

@@ -394,6 +394,7 @@ import { htmlEditorEventBus } from '@/event-bus';
import type { EventBus } from 'n8n-design-system/utils';
import { createEventBus } from 'n8n-design-system/utils';
import { useI18n } from '@/composables';
import type { N8nInput } from 'n8n-design-system';
export default defineComponent({
name: 'parameter-input',
@@ -1005,10 +1006,16 @@ export default defineComponent({
}
await this.$nextTick();
// @ts-ignore
if (this.$refs.inputField?.focus && this.$refs.inputField?.$el) {
// @ts-ignore
this.$refs.inputField.focus();
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
const inputRef = this.$refs.inputField as InstanceType<N8nInput> | undefined;
if (inputRef?.$el) {
if (inputRef.focusOnInput) {
inputRef.focusOnInput();
} else if (inputRef.focus) {
inputRef.focus();
}
this.isFocused = true;
}