Hide on click setting for root screen component

This commit is contained in:
Andrew Kingston 2022-08-17 15:47:50 +01:00
parent 6ef6b47c52
commit 7abf549b02
1 changed files with 7 additions and 2 deletions

View File

@ -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)}
<PropertyControl
type={setting.type}
control={getComponentForSetting(setting)}