This is not possible that there is no error comes in console, because any blockage comes in your code or data is not set perfectly that's why it's not show in preview mode after click on button.
In edit mode, first reset app state and then click on button without trigger query manually.
If you haven't already done so, can you try embedding the module in an app and then previewing the app? I would expect it to work just fine without having to embed but you never know.
It would also be super helpful to see your JSON for the purposes of debugging - feel free to send it to me via DM or, alternatively, give me your app name so that I can look it up on my end!
Thanks a lot for your response. Yes, I have already integrated the module into an app, but here is the JSON code again in the Google Drive link (I can't upload the JSON here). Could you please take a closer look at it?
Thanks for sharing, @Kevin553. This is actually super interesting! The short answer is that it works as expected when leaving the customHTMLPDF iframe visible.
It's more difficult to figure out exactly why that is the case, though. One observation is that toggling the "Hidden" attribute actually wraps the iframe in an InvisibleWidgetWrapper component.
Another thing that is super odd is that, even when the iframe is hidden, I can get everything to function correctly by manually inspecting its contents via the browser's dev tools.
In conclusion, I'm guessing that hidden components are being treated differently (maybe lazily loaded?) when wrapped in the InvisibleWidgetWrapper component. I'll reach out to our internal teams to see if this is intended behavior and provide an update here when I can. In the meantime, does it work for you to leave the iframe visible? You should still be able to give it a height of 0px via custom CSS in order to effectively hide it while allowing your script to still run correctly.