Conditional Display
All of Draftbit's components have Conditional Display Data props that let you pass in a value that evaluates to true
or false
(boolean). You can use the Conditional Display feature to hide or show a component when a certain condition is met. When a component is hidden, that component and all of its child (nested) components will not be rendered on the Screen.
Combining this with Variables or data from an API Endpoint can be a useful way to show the component in certain conditions. If the condition evaluates to a truthy value, the component will be shown.
For example, you might have a List and want to have separate layouts for the rendered items based on a certain condition. Or, maybe you have a certain feature you only want to display to a specific type of user.
Name | Description |
---|---|
Value | The value to use as the condition |
Operator | The operator to apply to the given Value.
|
Updated about 1 month ago