jcmcneal/react-step-wizard

Add current named step on step change callback

ayresflesch opened this issue · 0 comments

I was wondering if there's a way to add the active named step to the stats object used on step change callback.

this.setState({
activeStep: next,
classes,
}, () => {
// Step change callback
this.onStepChange({
previousStep: active + 1,
activeStep: next + 1,
});
});

Something like this, I guess:

// Step change callback
this.onStepChange({
    previousStep: active + 1,
    activeStep: next + 1,
    activeNamedStep: // get named step
});