Introducing: Conditional Display in Draftbit
What is Conditional Display?
A way to control the state of Draftbit components with logic.
What can I do with Conditional Display?
The first version of Conditional Display is pretty basic. Right now, you can control the visibility of a component based on the truthiness of a variable. For example, you could hide items in a list that have NULL values in them. Or you could not render a button on the screen until some variable exists.
What's next for Conditional Display?
We are spec'ing out enhancements to Conditional Display right now! If you have any requests, please post them in the comments. Right now, we are thinking through:
- More complex logic (beyond simple true/false)
- More complex behaviors (beyond simple render/don't render)
The type of variable you use with Conditional Display matters. For example, a String variable with value "false" still evaluates to TRUE. If you are experiencing unexpected results from Conditional Display, start here.