americanexpress / react-albus

✨ React component library for building declarative multi-step flows.
Apache License 2.0
1.1k stars 89 forks source link

Preserve query parameters when moving to next step #36

Open puopg opened 5 years ago

puopg commented 5 years ago

When the Wizard is route controlled, when I move to the next step, the url and state changes.

Now this is all good, but the query parameters are lost during that transition. So for example, I wanted to move from add -> confirm, and my route has:

/basePath/add?itemId="thisisanid"

when I move to the next step my url becomes

/basePath/confirm", when I want the url to preserve the query param as /basePath/confirm?itemId="thisisanid"

Is there a way to do this?

sumanalapati commented 5 years ago

Are you not maintaining it in the state using redux or something?

puopg commented 5 years ago

Well no I can do that, just since the interface for defining steps is strictly by name, an option to preserve query params when route controlled would be nice. Otherwise, routing is the form of navigation to move to steps within the wizard, and the next() method is cooler

skoshy commented 5 years ago

I just added a PR that tackles this issue, #43 .

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove no-issue-activity label or comment or this will be closed in 5 days.

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity.