-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Clear and concise description of the problem
I want user to pick a file to upload, but i don't know if user still selecting the file or he already closed the picker.
onChange triggers only after files selection/reset, but not after dialog just closed and that's ok, we just need another handle for that
Suggested solution
I propose to extend useFileDialog with additional handler, named onCancel, which will be coupled with native oncancel event and fire a callback when user just closes the picker without picking a file
Alternative
Also I can suggest making open() to return a promise (it's void now), which resolves on file changes and rejects on cancel. It solves our case specifically, but could be a breaking change, especially unhandled rejection
Additional context
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request