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'd like to pass a callback-like method in question and get it and execute it when Onsubmit, but the current code will pre-execute all the methods that aren't in special functions`
for(questionofquestions){({ name, type }=question);// evaluate type first and skip if type is a falsy valueif(typeoftype==='function'){type=awaittype(answer,{ ...answers},question)question['type']=type}if(!type)continue;// if property is a function, invoke it unless it's a special functionfor(letkeyinquestion){if(passOn.includes(key))continue;letvalue=question[key];question[key]=typeofvalue==='function' ? awaitvalue(answer,{ ...answers},lastPrompt) : value;}
Describe the solution you'd like
Don't handle the method passed in in question, leave it intact in onSubmit
The text was updated successfully, but these errors were encountered:
hcl-z
changed the title
Do not execute the method passed in in question
The method passed into question is executed automatically
Nov 14, 2024
Is your feature request related to a problem?
I'd like to pass a callback-like method in question and get it and execute it when Onsubmit, but the current code will pre-execute all the methods that aren't in special functions`
Describe the solution you'd like
Don't handle the method passed in in question, leave it intact in onSubmit
The text was updated successfully, but these errors were encountered: