What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hey, I'm using the ajax provider to load a molecule asynchronously (meaning the controller returns a

U012MFKV1D5
U012MFKV1D5 Posts: 13 🧑🏻‍🚀 - Cadet

Hey, I'm using the ajax provider to load a molecule asynchronously (meaning the controller returns a twig view which includes the molecule), however the associated javascript is not loaded, and therefore the molecule does not work properly. 1) Is it even possible to load molecules with their logic using the ajax provider? 2) If so, how can I achieve this? Thanks in advance, Tom.

Comments

  • U012MFKV1D5
    U012MFKV1D5 Posts: 13 🧑🏻‍🚀 - Cadet

    I resolved my issue. Once the ajax provider fetched the html, I located the component via getElementByXXX and called the component mount callback function manually. There might be a nicer way to do it but for now I stick with that.