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

Optionally Persist step state in url or localStorage #3

Closed
crobinson42 opened this issue Jun 8, 2018 · 2 comments
Closed

Optionally Persist step state in url or localStorage #3

crobinson42 opened this issue Jun 8, 2018 · 2 comments

Comments

@crobinson42
Copy link

Thoughts on adding feature for optional url hash of the step # or localStorage?

Very primitive initial thoughts:

<StepWizard persistSate="url">
    <Step><Step1 /></Step>
    <Step><Step2 /></Step>
    <Step><Step.. /></Step>
    <Step><Step..12 /></Step>
    <Step><WhateverComponentName /></Step>
  </StepWizard>
@jcmcneal
Copy link
Owner

I toyed with the idea of persisting the step in the url hash but you're right, it would have to be optional.

We could take it a step further and give each step a name so instead of the url saying #step2 it would be #whateverYouDefine and then pass a prop to the steps like

<StepWizard persistState="url">
   <Step name/hash='#whateverYouDefine'></Step>
</StepWizard>

Those are also my primitive thoughts. I appreciate the suggestions!

@jcmcneal
Copy link
Owner

This feature has been added in v4.3.0

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

No branches or pull requests

2 participants