Hello,
When using utils.openUrl()
to navigate to a new page, the url remains the same while the page underneath goes to the correct page. When I try this out in a non retool embedded app the url changes as expected. Anyone else encounter this?
It an issue for me since I'm navigating pages in the main site, but certain elements aren't updating.
A side note is I'm not sure if the forceReload property is taking effect either.
Hey @Patrick_Wong! Not noticing this, I've used a script in one embedded app to open the url of another app, appending some url params that are used in the second app. Those params are passed and utilized correctly, even when embedded.
Can you share how you are checking that the url has not changed? Also share a bit about the architecture, what value are the components supposed to be pulling from?
Hi Joe,
Thanks for looking into this.
The flow of the Retool embedded app works as follows:
- The embedded app lives in its own url
/embeddedApp
within my React App
- On the last screen of the embedded app, I call
utils.openUrl('/newUrl')
- The React app renders the
/newUrl
page, but in the address bar, it still says /embeddedApp
I would expect #3 would say /newUrl
to match what is rendering on the page, that's how I'm checking that the url has not changed.
Hey @Patrick_Wong, are you linking the url of the React app to the url of the embedded app in some way? It's possible I'm misunderstanding how you have this set up. But, if your React app has a url of /embeddedApp
and you are rendering the embedded Retool app there using the retrieved url, I wouldn't expect the React app url to change since it's still just rendering what's being sent by the original url it was given.
Changes in the url of what is rendered in the React app aren't going to be tied to the React app url by default.
Thanks for the response @joeBumbaca , I think I understand what you are saying and that makes sense, but I'm not sure if my use case falls under that example.
Would you expect the url to change or stay the same in the following example:
- React app url is
/embeddedApp
- Retool embed app calls
utils.openUrl('/newUrl')
- Should React app change to
/newUrl
or stays as /embeddedApp
?
- Retool embed app is now closed
If step 3 you wouldn't expect the react app url to change to /newUrl
. Is there an example that can get it to change?
Its hard to know without understanding how you are handling the routing in React and how you are embedding the Retool page. If the Retool page is rendered in an html element (ie: iFrame) in your React app, then the routing of the Retool page and the React app are completely separate. I would not expect the url of the React app to change in that scenario.
1 Like
We are using the react-retool library from the documentation. It looks like that is using an iframe under the hood.
And it sounds like unless I change that implementation or find another workaround I will not be able to change the React app's url with utils.openUrl
.
Once again thanks for the help!
1 Like