few more things

This commit is contained in:
Vikhyath Mondreti
2026-02-06 11:10:52 -08:00
parent c89ae23edb
commit 12f36871d9
3 changed files with 9 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ interface CredentialSelectorProps {
disabled?: boolean
isPreview?: boolean
previewValue?: any | null
previewContextValues?: Record<string, unknown>
}
export function CredentialSelector({
@@ -43,6 +44,7 @@ export function CredentialSelector({
disabled = false,
isPreview = false,
previewValue,
previewContextValues,
}: CredentialSelectorProps) {
const [showOAuthModal, setShowOAuthModal] = useState(false)
const [editingValue, setEditingValue] = useState('')
@@ -67,7 +69,11 @@ export function CredentialSelector({
canUseCredentialSets
)
const { depsSatisfied, dependsOn } = useDependsOnGate(blockId, subBlock, { disabled, isPreview })
const { depsSatisfied, dependsOn } = useDependsOnGate(blockId, subBlock, {
disabled,
isPreview,
previewContextValues,
})
const hasDependencies = dependsOn.length > 0
const effectiveDisabled = disabled || (hasDependencies && !depsSatisfied)

View File

@@ -332,6 +332,7 @@ function FolderSelectorSyncWrapper({
dependsOn: uiComponent.dependsOn,
}}
disabled={disabled}
previewContextValues={previewContextValues}
/>
</GenericSyncWrapper>
)

View File

@@ -785,6 +785,7 @@ function SubBlockComponent({
disabled={isDisabled}
isPreview={isPreview}
previewValue={previewValue}
previewContextValues={isPreview ? subBlockValues : undefined}
/>
)