diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte index d8dc9bf066..b4c8e7abad 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte @@ -36,7 +36,12 @@ } } - const canRenderControl = setting => { + const canRenderControl = (setting, isScreen) => { + // Prevent rendering on click setting for screens + if (setting?.type === "event" && isScreen) { + return false + } + const control = getComponentForSetting(setting) if (!control) { return false @@ -87,7 +92,7 @@ /> {/if} {#each section.settings as setting (setting.key)} - {#if canRenderControl(setting)} + {#if canRenderControl(setting, isScreen)} -
+
@@ -104,4 +111,10 @@ .wrap { flex-wrap: wrap; } + .clickable { + cursor: pointer; + } + .clickable :global(*) { + pointer-events: none; + } diff --git a/packages/client/src/utils/buttonActions.js b/packages/client/src/utils/buttonActions.js index c6f46d1c67..558cab8f21 100644 --- a/packages/client/src/utils/buttonActions.js +++ b/packages/client/src/utils/buttonActions.js @@ -334,8 +334,8 @@ const confirmTextMap = { */ export const enrichButtonActions = (actions, context) => { // Prevent button actions in the builder preview - if (!actions || get(builderStore).inBuilder) { - return () => {} + if (!actions?.length || get(builderStore).inBuilder) { + return null } // If this is a function then it has already been enriched