How do event listeners work on conditionally rendered items?

  • 1
  • Question
  • Updated 2 years ago
I'm updating a UI only field in a snippet. The UI only field is a checkbox used to conditionally render a button contained in a pop up. However, the button doesn't render or unrender when the snippet runs even though I verified that the UI only field value was correct.

When I close and reopen the pop up (rerunning the render logic?) the button is rendered as expected. 

What event is causing the button to rerun its render logic? How can I replicate this in snippet so that my button will render correctly without having to close and reopen the pop up?
Photo of Shmuel Kamensky

Shmuel Kamensky, Champion

  • 4,328 Points 4k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Shmuel Kamensky

Shmuel Kamensky, Champion

  • 4,328 Points 4k badge 2x thumb
I'm not sure why it wasn't rendering on its own, but I used the solution in this post to resolve the issue.
(Edited)