-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to retrieve message from postMessage ? #28
Comments
I'm struggling with the same problem. Did you manage to find a solution? |
@FlorianRuen as a test, can you try posting your message with a wildcard as the second argument?
|
If that doesn't do it, would you please share the version of Retool and the version of react-retool you're using? |
@ftoyoshima I haven't found a solution to date, so I was doing with a classic loader on the iFrame but the rendering was not terrible, because the loader disappeared before the end of the iFrame loading @kentwalters It's not working, I add a new query that run a JS script (with content in your message) But my custom message from For the |
@FlorianRuen @ftoyoshima Can you please confirm that in |
That's it! This solved the problem! Thanks for the support @kentwalters! |
@kentwalters it's already enabled on my side. So the problem persist |
@ftoyoshima maybe you can post your code or something to try to find the source of my problem ? |
@FlorianRuen, I created a minimal working example here: https://github.com/ftoyoshima/react-retool-sandbox The linked Retool App, is basically a button which triggers a JS Query with the following code: console.log('(Retool internal log is working)')
parent.postMessage('hi!!', '*') |
@FlorianRuen you can also clone and run this project, which includes a working sample application. Can you try that and let us know what you see? |
@kentwalters not working for me, I got the same : one button that refresh all requests and after trigger a query console.log('(Retool internal log is working)')
parent.postMessage('hi!!', '*') And on my app side, I got only the message generic from retool (same as my previous screenshots), but I can't see the "Hi" message appear in my console ... I can only see when parent date has been updated, one console each time in console. but my custom message doesn't appear inside (i check all message in data object) |
@FlorianRuen, did you try it with my React example? Maybe it is an issue with some React configurations. |
@ftoyoshima Seems working now! I think it was always working, I thought the maybe I was looking in the wrong place, but by the way, maybe the text in the console "Received message from parent" doesn't make sense in a sense, if the messages from This text in the console isn't from my code, but from Retool (can't find occurence in the library), can you see it in the console while the iframe is loading ? |
Hello there,
I'm new user of Retool (just a week ago), and I want to display a custom loading component, while the react-retool is loading. To do this, I'm looking to send a message when all the requests are loaded, so my react application, can change a loadingState from true to false or something else
The postMessage seems working, but I can't retrieve the message on my react application
In this case, the function is called, because I see the first console.log, but for the second one, nothing is displayed
The message I send in postMessage function is
Any ideas ?
The text was updated successfully, but these errors were encountered: