Testing Navigate To param passing in "edit" mode

I’m trying to pass some parameters using the optional params feature of the navigateTo function. On a deployed app, this works as expected. However, I’m not able to pass parameters while editing the same app. In edit mode, appsmith.URL.queryParams returns only {“branch”:“main”} on the new page (it returns {“branch”:“main”, “layerNumber”:“2”} on the deployed app, as expected). Is it possible to pass parameters in edit mode? Or am I not able to do this by design?

I also noticed that you can’t pass 0 (zero) as a parameter value (e.g. {layerNumber:0} does not pass anything). This is apparently a known bug, but I’m adding it here in case this post helps anyone in the future.

Hey!

QQ: Do you see layerNumber=2 as a queryParams in the URL?

I just tested something similar and it works for me. Which version of Appsmith are you on?

We’ve identified a bug - [Bug]: `navigateTo` function broken. Fails to set queryParams if the app is connected to Git · Issue #18376 · appsmithorg/appsmith · GitHub

Thank you for your responses, Pranav (and I’m sorry for being slow to respond!). I’m glad to see that you were able to reproduce this. For what it’s worth, my app is connected to git as well.

We took our time, but this issue is fixed now. Please upgrade to v1.8.11

1 Like