@mantine/dropzone. Loading state is triggered after files are uploaded. Not before #6677
-
Dependencies check up
What version of @mantine/* packages do you have in package.json?7.12.1 What package has an issue?@mantine/dropzone What framework do you use?Vite In which browsers you can reproduce the issue?All Describe the bugThe loading prop of the dropzone when set to true, creates a loading overlay after files have been uploaded, instead of during file upload. I expected to display a spinner as documents upload, not after documents are finished uploading. In the console logs, you can see how loading state triggers after the content script completes the entire file upload before the console.log statement from onDrop() executes. If possible, include a link to a codesandbox with a minimal reproductionhttps://codesandbox.io/p/sandbox/mantine-react-template-forked-jj6jx9 Possible fixPlease upload a file and look at the console.log. The fix would be to change where the loading state kicks in. It should be simultaneous with the ondrop starting. Self-service
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
Dropzone
component does not handle file uploads – this logic belongs to your application.loading
prop controls the visibility of the loading overlay, it is changed only by your application as well.