I wanted to make the value of imageUrl to be null if the remove button is click using uploadcare/react-widget
. Right now, it doesn't set the value to null, it still returns the value of the original imageUrl. How do you call the function when you click the 'remove button'?
<Widget
tabs="file"
name="imageUrl"
clearable="true"
imagesOnly="true"
previewStep="true"
value={props.values.imageUrl}
onChange={upload =>
props.setFieldValue('imageUrl', upload.originalUrl)
}
publicKey={process.env.UPLOADCARE_KEY}
/>