I was trying to hide a floating button unless session storage has an entry of “XYZ”. I gave the button a display of none, then used an interaction to show the button using the before mentioned interaction condition. Rather than only displaying the button when a session entry of XYZ exists, the interaction always executes, and the button is always shown.
Upon further examination, pulling the button out of the component correctly executes the interaction only when the interaction condition is true.
To try it:
- create a component
- place a button inside the component
- set the button to display none
- create a property for the component
- create an interaction that shows the button on content load
- use an interaction condition to show the button, using the property you created for the interaction condition (type=session storage, browser storage key=[your property], browser storage compare=exists)