You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if stepsNavigation is turned off or user clicked on existing step again (on step 2 and clicked on 2 again) then ignore
180
+
evt.preventDefault();
181
+
evt.stopPropagation();
190
182
191
-
evt.persist();// evt is a react event so we need to persist it as we deal with aync promises which nullifies these events (https://facebook.github.io/react/docs/events.html#event-pooling)
183
+
return;
184
+
}
192
185
193
-
varmovingBack=evt.target.value<_this3.state.compState;// are we trying to move back or front?
194
-
varpassThroughStepsNotValid=false;// if we are jumping forward, only allow that if inbetween steps are all validated. This flag informs the logic...
195
-
varproceed=false;// flag on if we should move on
186
+
evt.persist();// evt is a react event so we need to persist it as we deal with aync promises which nullifies these events (https://facebook.github.io/react/docs/events.html#event-pooling)
// validation was a success (promise or sync validation). In it was a Promise's resolve() then proceed will be undefined, so make it true. Or else 'proceed' will carry the true/false value from sync v
200
-
proceed=valid;
188
+
varmovingBack=evt.target.value<this.state.compState;// are we trying to move back or front?
189
+
varpassThroughStepsNotValid=false;// if we are jumping forward, only allow that if inbetween steps are all validated. This flag informs the logic...
// validation was a success (promise or sync validation). In it was a Promise's resolve() then proceed will be undefined, so make it true. Or else 'proceed' will carry the true/false value from sync v
195
+
proceed=valid;
205
196
206
-
if(proceed){
207
-
if(!movingBack){
208
-
// looks like we are moving forward, 'reduce' a new array of step>validated values we need to check and 'some' that to get a decision on if we should allow moving forward
// ... plus the finally then() above is what throws the JS Error so we need to catch that here specifically
237
-
setTimeout(function(){
238
-
throwe;
203
+
// looks like we are moving forward, 'reduce' a new array of step>validated values we need to check and 'some' that to get a decision on if we should allow moving forward
0 commit comments