@camera.ui/sdk / storage / SchemaCondition
Interface: SchemaCondition
Defined in: storage/index.ts:35
Condition that controls when a field is visible. The field is shown only when the condition evaluates to true against the current form values.
Combine multiple conditions on a field via an array — all must pass (logical AND).
Example
typescript
// Show 'apiKey' only when 'authMode' equals 'token':
{ key: 'apiKey', type: 'string', title: 'API Key', description: '',
condition: { key: 'authMode', value: 'token' } }
// Show 'port' only when 'protocol' is one of the listed values:
condition: { key: 'protocol', operator: 'in', value: ['http', 'https'] }Properties
key
key:
string
Defined in: storage/index.ts:37
Key of another field whose value drives visibility.
operator?
optionaloperator?:SchemaConditionOperator
Defined in: storage/index.ts:41
Comparison operator (default: 'eq').
value
value:
any
Defined in: storage/index.ts:39
Expected value — single value, or array for 'in' / 'nin'.