Configuration
To implement dependencies, add adependencies
property to your component’s JSON configuration. This property accepts an array of objects that specify which fields must be interacted with before the current field becomes visible.
In order for a field to show when any value is selected:
Value-Specific Dependencies
For more granular control, you can require specific values using a dependency object, with an additional specified value property. The dependent field will only appear when the specified field contains the exact value.null
:
Component-Specific Behaviors
While dependencies are widely supported, certain components have unique behaviors or limitations, examples can be found below:- Toggle components: Only trigger dependencies when set to
true
(on state) - Some components: May not support dependencies due to their functional design
Best Practices
- Use dependencies to progressively reveal complex options
- Keep dependency chains simple and logical
- Test all dependency scenarios to ensure expected behavior
- Document any custom dependency logic for team members and add to your app’s help centre article