feat(editor): Disable reset value for code and sql editors (no-changelog) (#16741)

This commit is contained in:
Daria
2025-06-27 10:03:50 +03:00
committed by GitHub
parent 91206ef3cc
commit 2e78771ebf

View File

@@ -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 ||