Why cant i trigger a custom event from a reusable element inside a different reusable element?
I can trigger it in a non reusable element but wont show up in a reusable element.
Why cant i trigger a custom event from a reusable element inside a different reusable element?
I can trigger it in a non reusable element but wont show up in a reusable element.
Reusable elements exist (In the Bubble Editor) independent of the page they may happen to be placed on.
So they have no way of knowing anything about the page, nor about any other elements (including Reusable Elements) which may, or may not, happen to be on the same page.
If you need to trigger an action inside a RE from inside another RE, in my opinion the simplest way to do this is using a JavaScript to Bubble element trigger event, with a simple JavaScript action to call it.
Alternatively, you can set up a (sometimes complex) series of custom states and event triggers on the page, to identify when something happens inside one RE, and use that to trigger something inside another RE.
thanks, i guess i will just do the custom states
Sure, if you only have 2 REs on a single page, using custom states for this is not too difficult.
But if you’ve got multiple REs on the page, or Nested REs, or REs inside RGs (or multiple nested REs inside multiple nested RGs!!), it gets very complicated using custom states, and a simple JavaScript action is much easier.