isHashEnabled sets #undefined
johisco opened this issue · 2 comments
Im experiencing some issues with the isHashEnable flag where it sets the router browser url to #undefined instead of #step1 ... #step{N} etc...
<StepWizard
isHashEnabled={true}
transitions={{
enterRight: "",
enterLeft: "",
exitRight: "",
exitLeft: "",
}}
>
{this.state.steps.map((stepdata, i) => {
return (
<CustomStep
key={i}
data={stepdata}
update={this.setData}
canGoBack={this.canGoBack}
/>
);
})}
</StepWizard>
Im using eact-router-dom
as my router if that matters... ?
The hashKeys are computed upfront when the StepWizard component is constructed
react-step-wizard/src/index.js
Line 11 in 17e80df
react-step-wizard/src/index.js
Lines 43 to 45 in 17e80df
I suppose that could happen if your this.state.steps
is changing after the first render, because the steps would probably no longer re-hashed, then. This is just a guess, though; I could look into fixing this you provide a minimal reproduction.
Closing due to lack of response