Skip to content

UploadPreview won't render inside of a modal (or conditionally rendered pane) #408

Answered by yoavniran
asibilia asked this question in Q&A
Discussion options

You must be logged in to vote

hey @asibilia
I believe this is most likely related to the fact that the UploadPreview isnt mounted when the upload start events are fired and therefore the event-handler the preview relies on isnt fired. In this case the preview wont be aware of the uploads and you will experience the behavior you described.

MUI perhaps can help with this by ensuring the drawer is kept mounted.
I suggest giving this a try.

If this doesnt help you will need to either find a different way to keep the preview mounted when upload begins, no way around that i'm afraid. Or you will need to handle the life-cycle events on your own and render your own preview component to show the uploads based on your app's state.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@asibilia
Comment options

@asibilia
Comment options

@yoavniran
Comment options

Answer selected by asibilia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants