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

fixed #153 #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function (_Component) {
} else {
// check if isValidated was exposed in the step, if yes then set initial state as not validated (false) or vice versa
// if HOCValidation is used for the step then mark it as "requires to be validated. i.e. false"
i.validated = i.component.type && i.component.type.prototype && i.component.type.prototype.isValidated && _this2.isStepAtIndexHOCValidationBased(idx) ? false : true;
i.validated = i.component.type && i.component.type.prototype && i.component.type.prototype.isValidated && !_this2.isStepAtIndexHOCValidationBased(idx) ? false : true;
}

return i;
Expand All @@ -94,7 +94,6 @@ function (_Component) {
}

return {
current: indx,
styles: styles
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class StepZilla extends Component {
} else {
// check if isValidated was exposed in the step, if yes then set initial state as not validated (false) or vice versa
// if HOCValidation is used for the step then mark it as "requires to be validated. i.e. false"
i.validated = i.component.type && i.component.type.prototype && i.component.type.prototype.isValidated && this.isStepAtIndexHOCValidationBased(idx) ? false : true;
i.validated = i.component.type && i.component.type.prototype && i.component.type.prototype.isValidated && !this.isStepAtIndexHOCValidationBased(idx) ? false : true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately does not fix it @zeel-swiggy - when you make this change it stop your jumping to Step 4, but it wont stop you from jumping to step 5 (i.e. it skips validation check for HOCValidation Step)

}

return i;
Expand All @@ -50,7 +50,7 @@ export default class StepZilla extends Component {
}
}

return { current: indx, styles };
return { styles };
}

getPrevNextBtnLayout(currentStep) {
Expand Down