The snippet you have provided above is for Content Uploader widget. However, as mentioned in the workshop, we can forward Content Previewer option properties from Content Explorer Widget via ‘contentPreviewProps’ property.
Similarly, As mentioned in the following link, we can forward Content Uploader options properties from Content Explorer via ‘contentUploaderProps’ property.
I was trying to get ‘onClose’ event of Content Uploader from Content Explorer widget. But, I was not able to receive the close event.
@Niladri , this is not forgoten, I’m asking around!!!
I think you’ve found a bug in our code! The ContentExplorer element does indeed pass a contentUploaderProps object to ContentUploader but specifically the onClose prop is being overwritten by ContentExplorer’s own handler for ContentUploader.
Here is where contentUploaderProps and onClose are passed to UploadDialog:
Notice the separate contentUploaderProps and onClose props.
Then contentUploaderProps is being spread to ContentUploader but because the separate onClose prop comes after, it is overriding any onClose that was added to contentUploaderProps:
Thanks for the explanation. I hope this will be fixed soon.
Just a quick clarification: The token generator function passed via “contentPreviewProps” will be overridden, thereby preventing us from passing a custom token generation function to the Content Preview widget from Content Explorer widget.