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
I want to provide some clarification or help to people using the wizard with HTTP requests. Hopefully the docs could be updated to clarify how isValidated() works or how to use it with async.
DETAILS: I've been using the Wizard to validate a Login request. i.e. axios.post('/login') -> if username & password are ok -> next step, else -> throw validation error. What I didn't realize is that isValidated() is being called by nextButtonClick() which is synchronous, so it doesn't wait for the HTTP request to resolve before changing steps. Simply adding async to NextButtonClick() lets it wait for the request to resolve, and allows you to use HTTP requests with the wizard.
I want to provide some clarification or help to people using the wizard with HTTP requests. Hopefully the docs could be updated to clarify how isValidated() works or how to use it with async.
DETAILS: I've been using the Wizard to validate a Login request. i.e. axios.post('/login') -> if username & password are ok -> next step, else -> throw validation error. What I didn't realize is that isValidated() is being called by nextButtonClick() which is synchronous, so it doesn't wait for the HTTP request to resolve before changing steps. Simply adding async to NextButtonClick() lets it wait for the request to resolve, and allows you to use HTTP requests with the wizard.
Hope this saves you some frustration!
NextButtonClick()
isValidated()
}
The text was updated successfully, but these errors were encountered: