File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1140,9 +1140,20 @@ function PreviewEditorContent({
11401140 ( block . advancedMode ?? false ) ||
11411141 hasAdvancedValues ( blockConfig . subBlocks , rawValues , canonicalIndex )
11421142
1143+ const isPureTriggerBlock = blockConfig . triggers ?. enabled && blockConfig . category === 'triggers'
1144+ const effectiveTrigger = block . triggerMode === true || block . type === 'starter'
1145+
11431146 const visibleSubBlocks = blockConfig . subBlocks . filter ( ( subBlock ) => {
11441147 if ( subBlock . hidden || subBlock . hideFromPreview ) return false
1145- if ( subBlock . mode === 'trigger' && blockConfig . category !== 'triggers' ) return false
1148+
1149+ if ( effectiveTrigger ) {
1150+ const isValidTriggerSubblock = isPureTriggerBlock
1151+ ? subBlock . mode === 'trigger' || ! subBlock . mode
1152+ : subBlock . mode === 'trigger'
1153+ if ( ! isValidTriggerSubblock ) return false
1154+ } else {
1155+ if ( subBlock . mode === 'trigger' && blockConfig . category !== 'triggers' ) return false
1156+ }
11461157 if ( ! isSubBlockFeatureEnabled ( subBlock ) ) return false
11471158 if (
11481159 ! isSubBlockVisibleForMode (
You can’t perform that action at this time.
0 commit comments