Closed bent-belmark closed 1 year ago
Hey @bent-belmark, try to wrap your validators and progress callback into the useMemo
and useCallback
.
Like this: https://codesandbox.io/s/happy-scooby-tcw60j?file=/src/App.js:773-784
@nd0ut - That works, thanks!
Describe the bug
When using validators and other events, updating state variables within events seems to break the upload panel.
Removing the state variable update in my code below causes things to work.. but as soon as I update a state variable from either an onProgress or onChange, the uploader breaks (does not show files when selected). No errors are logged to the console.
Removing the validation, the onChange or onProgress works with or without state variable changes. Validation works without the onChange/onProgress events touching state variables.. I'd like to be able to use full functionality!
This issue seems not to be valid using the widget, but the panel fits our needs while the widget does not.
Code / screenshots
Environment