New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(useFileDialog): new function #1218
Conversation
} | ||
|
||
return { | ||
files: readonly(files), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's readonly, we might need an extra function reset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, a reset
function would be needed
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
packages/core/useFileDialog/index.ts
Outdated
...options, | ||
...localOptions, | ||
} | ||
const input = document.createElement('input') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to move to the useFileDialog
scope? I'm worried that using the open
function multiple times will create too many input
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved outside useFileDialog
now. Thanks!
`capture` has more optional values
Adds an open file dialog hook without struggling with file input.