Closed lucasmrl closed 4 years ago
Hi there! I have a component that will render the alert. If I click outside the alert, I got this error: "TypeError: Cannot read property 'onCancel' of undefined"
The code for the alert:
<SweetAlert title="" onConfirm="" showConfirm="false" showCloseButton="true" onCancel={this.onCancel} customButtons={ <React.Fragment> <input onClick={() => window.location.reload(false)} value="Add" type="submit" disabled="true" className="hidden bg-gray-900 text-white flex items-center content-center justify-center rounded-md p-2 w-32 mb-1 cursor-pointer" /> </React.Fragment> } > <div className="">{projectForm}</div> </SweetAlert>
This code is inserted on a function component, inside the return method. I also tried:
Thanks in advance!
Not an issue.
Hi there! I have a component that will render the alert. If I click outside the alert, I got this error: "TypeError: Cannot read property 'onCancel' of undefined"
The code for the alert:
This code is inserted on a function component, inside the return method. I also tried:
Thanks in advance!