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

stateGo() doesn't update currentParams #48

Closed
danielwalczak opened this issue Apr 12, 2016 · 3 comments
Closed

stateGo() doesn't update currentParams #48

danielwalczak opened this issue Apr 12, 2016 · 3 comments

Comments

@danielwalczak
Copy link

I found this issue, when i wanted to change query params in current state.
This action doesn't update params via reducer, because '$stateChangeSuccess' is not trigger.

e.g
Current state is 'Home' and then do stateGo('Home', { filter: 'test' }).

@JesterXL
Copy link

JesterXL commented Jul 18, 2016

I'm having the same problem. In my old code, it'd be something like here where I use the $state.go's promise to access the $stateParams after the the then. Here, however, I don't really have a then to access using Redux, and a bunch of logs confirm they never update anyway.

Will report back if I find a hackaround.

Edit: Updated screenshot showing the discrepancy with logs added (notice text property). What's weird is that the logs in the redux-ui-router's router-middleware reports the correct payload parameters, but somehow they don't make it to the state; the $stateParams and the URL are correct, just not the Redux store.

screen shot 2016-07-18 at 3 43 47 pm

@JesterXL
Copy link

If I comment out the unsubcribeStateChangeListener method on line #19 of router-listener.js, the $locationChange event continues to fire and appears to correctly update the store now. Not sure of adverse effects yet.

@hally9k
Copy link
Collaborator

hally9k commented Jul 24, 2016

@JesterXL @danielwalczak I think this is fixed in the new version (0.6.0). At least I cant reproduce it in the example on my end. If you want to have a jam and see if it's working for your cases that would be awesome.

@hally9k hally9k closed this as completed Sep 15, 2016
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

3 participants