Dynamic & Static Events for Conditional Region on Show / Hide

Hi. Is it possible to have Dynamic and Static Events for Conditional Region on Show / Hide, just like the ones we have for Dynamic Collapses. The reason for this request is that, event script located outside conditional region that loaded before the condition is shown will not work because the target elements within conditional region haven’t been loaded into the DOM yet. Well of course we can place the script within the conditional region to make it work but for a global event that relates to several conditional regions, having something to trigger it when the region is shown/hide will be very helpful. Another usage case is that, we can run a server connect, like load a data when only the conditional region is shown.

Show/Hide static and dynamic events will be added to the conditional regions in the next update.

3 Likes

Very cool. Thanks very muchy :heart_eyes::heart_eyes:

Was this added??? Having the same issue… server connect dynamic data isn’t loading in conditional containers

You have to load it manually using Dynamic Event > Display > Show > Your Server Connect

it works of you use conditional regions… if you use a regular div and add conditional region after it wont work.

I’ve just tested adding a dynamic event to a section with conditional properties and it works as expected.

<section id="ps_menu" class="container" is="dmx-if" dmx-bind:condition="(var_modul.value == 'a')" dmx-on:show="notifies1.success('Test')">