Hide on click setting for root screen component
This commit is contained in:
parent
6ef6b47c52
commit
7abf549b02
|
@ -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)
|
const control = getComponentForSetting(setting)
|
||||||
if (!control) {
|
if (!control) {
|
||||||
return false
|
return false
|
||||||
|
@ -87,7 +92,7 @@
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{#each section.settings as setting (setting.key)}
|
{#each section.settings as setting (setting.key)}
|
||||||
{#if canRenderControl(setting)}
|
{#if canRenderControl(setting, isScreen)}
|
||||||
<PropertyControl
|
<PropertyControl
|
||||||
type={setting.type}
|
type={setting.type}
|
||||||
control={getComponentForSetting(setting)}
|
control={getComponentForSetting(setting)}
|
||||||
|
|
Loading…
Reference in New Issue