skip to Main Content

Why is YUP conditional validation causing branch is not a function at Condition.fn error – Reactjs

I have a MUIRadioGroup (options = Low, Medium and High) and a multi-select MUIAutocomplete component on my form. <MUIRadioGroup name="requestDetail.riskAssesmentDetail.riskClassification" label="Risk Classification" variant="outlined" size="small" defaultValue /> <MUIAutocomplete name="requestDetail.riskAssesmentDetail.safetyDetail.investigationType" label="Type of Investigation" variant="outlined" size="small" multiple disableCloseOnSelect options={API_Safety_InvestigationType} /> My Schema is...…

VIEW QUESTION

Firebase – How to run a function first before updating the array in react JS?

const handleItinerary = (e, type) => { var index = parseInt(e.target.name); let arr = [...itinerary]; if (type === "imageUrl") { const date = new Date().getTime(); const storageRef = ref(storage, `${date}`); uploadBytes(storageRef, e.target.files[0]).then((snapshot) => { getDownloadURL(storageRef).then((downloadURL) => { arr[index]["imageUrl"] = downloadURL;…

VIEW QUESTION
Back To Top
Search