@camera.ui/sdk / storage / SchemaCondition
Interface: SchemaCondition
Defined in: storage/index.ts:31
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:33
Key of another field whose value drives visibility.
operator?
optionaloperator?:SchemaConditionOperator
Defined in: storage/index.ts:37
Comparison operator (default: 'eq').
value
value:
any
Defined in: storage/index.ts:35
Expected value: a single value, or an array for 'in' / 'nin'.