Skip to content
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

Routing to same page with dynamic params #120

Open
upstroke opened this issue Dec 4, 2020 · 2 comments
Open

Routing to same page with dynamic params #120

upstroke opened this issue Dec 4, 2020 · 2 comments

Comments

@upstroke
Copy link

upstroke commented Dec 4, 2020

I have the problem when I am routing to the same page with dynamic parameters, that stencil-router is not rerendering.
I am using an input as a search field. The dropdown holds the link to a details page with an id as parameter (see scrennshot)
The route for the dynamic link: <stencil-route url='/details:id' component='app-details' /> When I am on the details page and change the dynamic id the site will not render again. My solution right now is to reload the page, but than I am loosing the search results and I have to input a new search again.

@Method()
    async goTo(e, route, data) {
      e.preventDefault();
      this.history.push(route, {data})
      window.location.reload()
    }

Link tho the repro: https://github.com/upstroke/tmdb-stencil-frontend

Bildschirmfoto 2020-12-02 um 11 11 18

@upstroke
Copy link
Author

Hm, seems no one has the same problem?

@claviska
Copy link

claviska commented Dec 30, 2020

I wasn't able to replicate it in your repo, as it requires an API key. However, I tried a simple update in a starter app using this.history.push('/route/param') and I'm seeing both the route and param updating.

If you can provide a reduced test case that will help a lot. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants