Show and hide components
Use conditions for interface state while keeping permissions enforced separately.
Each component has Visible (expression) in Properties. Set a fixed boolean for an always-visible or always-hidden component, or bind it to app state or a component's published value when the interface should respond to user actions.
Create conditional content
- Select the component and open Properties.
- Find Visible (expression).
- Enter the intended condition, such as {{ app.detailsOpen }}.
- Wire an event action to set that state when the user opens or closes the detail view.
- Test both states in Preview and in the saved app.
For example, a selected-row event can store the selected record and open a detail pane. A close event can set detailsOpen to false. Keep the selected record and visibility state consistent so an open pane does not show an obsolete selection.
Hidden state and initialization
Ordinary hidden components are unmounted. When shown again, their internal local state can initialize again. A component that explicitly supports Preserve state while hidden can retain its mounted state after its first display when that literal setting is enabled. An initially hidden preserved component is not initialized until first shown.
Use preservation only where the component reference advertises it; adding a keepMounted field to an arbitrary type does not create that capability. A string that looks like true is also different from the literal boolean expected by a literal setting.
Visibility is presentation
Hiding a component does not revoke source access, delete its records, or grant permission to a user who lacks it. Design the app's source scope, storage policy, sharing, and restricted review paths independently. An app should remain properly authorized even if the layout changes.
Likewise, conditionally hiding a run button is not a replacement for a source's Allow run trigger setting. That setting and the current host permissions decide whether the action can execute.
If content is missing unexpectedly, inspect the condition, its referenced state, initialization, and diagnostics before rearranging the canvas. A broken visibility binding leaves the component visible with its error rather than hiding the problem. Use Outline to select a component whose valid visibility condition currently hides it.