mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
feat(editor): Migrate debounce mixin to useDebounce composable (no-changelog) (#8244)
This commit is contained in:
@@ -508,7 +508,6 @@ import { isResourceLocatorValue } from '@/utils/typeGuards';
|
||||
import { CUSTOM_API_CALL_KEY, HTML_NODE_TYPE, NODES_USING_CODE_NODE_EDITOR } from '@/constants';
|
||||
|
||||
import type { PropType } from 'vue';
|
||||
import { debounceHelper } from '@/mixins/debounce';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
@@ -522,6 +521,7 @@ import { useI18n } from '@/composables/useI18n';
|
||||
import type { N8nInput } from 'n8n-design-system';
|
||||
import { isCredentialOnlyNodeType } from '@/utils/credentialOnlyNodes';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import { useDebounce } from '@/composables/useDebounce';
|
||||
|
||||
type Picker = { $emit: (arg0: string, arg1: Date) => void };
|
||||
|
||||
@@ -540,7 +540,7 @@ export default defineComponent({
|
||||
ResourceLocator,
|
||||
TextEdit,
|
||||
},
|
||||
mixins: [workflowHelpers, debounceHelper],
|
||||
mixins: [workflowHelpers],
|
||||
props: {
|
||||
additionalExpressionData: {
|
||||
type: Object as PropType<IDataObject>,
|
||||
@@ -612,11 +612,13 @@ export default defineComponent({
|
||||
const externalHooks = useExternalHooks();
|
||||
const i18n = useI18n();
|
||||
const nodeHelpers = useNodeHelpers();
|
||||
const { callDebounced } = useDebounce();
|
||||
|
||||
return {
|
||||
externalHooks,
|
||||
i18n,
|
||||
nodeHelpers,
|
||||
callDebounced,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -1243,7 +1245,7 @@ export default defineComponent({
|
||||
this.$emit('textInput', parameterData);
|
||||
},
|
||||
valueChangedDebounced(value: NodeParameterValueType | {} | Date) {
|
||||
void this.callDebounced('valueChanged', { debounceTime: 100 }, value);
|
||||
void this.callDebounced(this.valueChanged, { debounceTime: 100 }, value);
|
||||
},
|
||||
onUpdateTextInput(value: string) {
|
||||
this.valueChanged(value);
|
||||
|
||||
Reference in New Issue
Block a user