jQuery-Smart-Wizard icon indicating copy to clipboard operation
jQuery-Smart-Wizard copied to clipboard

Step indexing: 0 or 1-based?

Open garychapman opened this issue 9 years ago • 1 comments

I notice that selected is 0-based, but the context variables supplied toonLeaveStep and onShowStep are 1-based. Is there a reason for this discrepancy?

What convention is used by errorSteps, goToStep, disableStep, enableStep and others?

garychapman avatar Apr 14 '15 07:04 garychapman

Everything except that original 'selected' value is 1 based. The discrepancy was intentional for backwards compatibility with the original project.

To make it consistent I'd recommend deprecating 0-based selected and supplementing it with a one-based selectedStep or something of that sort.

mstratman avatar Apr 14 '15 17:04 mstratman