From 2e78771ebf1f6751c03beabfb3c2185b3e44c145 Mon Sep 17 00:00:00 2001 From: Daria Date: Fri, 27 Jun 2025 10:03:50 +0300 Subject: [PATCH] feat(editor): Disable reset value for code and sql editors (no-changelog) (#16741) --- .../editor-ui/src/components/ParameterOptions.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/frontend/editor-ui/src/components/ParameterOptions.vue b/packages/frontend/editor-ui/src/components/ParameterOptions.vue index 416fb9e40e..94fb6835d8 100644 --- a/packages/frontend/editor-ui/src/components/ParameterOptions.vue +++ b/packages/frontend/editor-ui/src/components/ParameterOptions.vue @@ -121,7 +121,16 @@ const actions = computed(() => { disabled: isDefault.value, }; - const parameterActions = hasFocusAction.value ? [resetAction, focusAction] : [resetAction]; + // The reset value action is not working correctly for these + const hasResetAction = !['codeNodeEditor', 'sqlEditor'].includes( + props.parameter.typeOptions?.editor ?? '', + ); + + // Conditionally build actions array without nulls to ensure correct typing + const parameterActions = [ + hasResetAction ? [resetAction] : [], + hasFocusAction.value ? [focusAction] : [], + ].flat(); if ( hasRemoteMethod.value ||