fix(selector): remove subblock state prop for subblock component (#2151)

This commit is contained in:
Vikhyath Mondreti
2025-12-01 13:46:32 -08:00
committed by GitHub
parent cb0c55c6f6
commit ede41af674
2 changed files with 3 additions and 3 deletions
@@ -346,10 +346,11 @@ function SubBlockComponent({
| undefined
// Use dependsOn gating to compute final disabled state
// Only pass previewContextValues when in preview mode to avoid format mismatches
const { finalDisabled: gatedDisabled } = useDependsOnGate(blockId, config, {
disabled,
isPreview,
previewContextValues: subBlockValues,
previewContextValues: isPreview ? subBlockValues : undefined,
})
const isDisabled = gatedDisabled
@@ -611,7 +612,7 @@ function SubBlockComponent({
disabled={isDisabled}
isPreview={isPreview}
previewValue={previewValue}
previewContextValues={subBlockValues}
previewContextValues={isPreview ? subBlockValues : undefined}
/>
)
@@ -353,7 +353,6 @@ export function Editor() {
blockId={currentBlockId}
config={subBlock}
isPreview={false}
subBlockValues={subBlockState}
disabled={!userPermissions.canEdit}
fieldDiffStatus={undefined}
allowExpandInPreview={false}