Change query param url without reload

Hi

First, sorry for my poor english.

Second, sorry for my poor dev skills.

Here is my issue in weweb :

I have a search page where i navigate on results page with query param bind on my variable. On page load i make a rest api and save results on a variable using in a list collection. Until now, everything works.

But on my page results, i have a drawer to change some inputs and make new search.

I tried to make to same thing as on my search page, and navigate on the page ( here the same page), with my query new param but the url does not change. I try to make with external link but the reload is too long this is not what i want . how to fix it ? i need some js ? or i miss something simple? for now i launch the api request to have the right results but in case or refresh the url param are not here so it’s a provisionnal step. I hope i’m clear not sure at all ! enough talking thanks for your help :slight_smile: !!!

Hi Kristine, welcome to the community :waving_hand:

When you use Navigate → Internal page → same page, it will update the URL without reload.

You don’t need custom JS for that.

The key is that the Queries field must contain a non-empty object with the values you want in the URL. For example:

{
  search: searchVar,
  category: selectedCategory
}

Can you share a screenshot on the results you are storing in your “Recherche globale” variable?

Hi,

Thanks for quick answer! Honestly i spent two days to understand how query param works. At first i put my variable in one time in queries, and i saw that weweb make the url with all the key and value. It works perfectly when i come from one page to another page. But when i make the same action in the same page to refresh query, the first time it works, but everytime i open again the drawer to change value, nothing happen. I tried many things : display each value in query, use param page , ,use a variable query but need to json.stringify to read my object variable. Nothing works, my url browser does not update, so if i refresh the page, i lost my query. I’m pretty sure it can be simple but i dont know what i have to do properly What’s is the good way ? I’m sorry , i’m really newbie in this world (but very like to use weweb ( until now :sweat_smile: ), again thanks for you help ! really appreciate that

something like this in url : no update done when i navigate on the same page image