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
fix: add path type in acceptedFiles #1178
base: master
Are you sure you want to change the base?
fix: add path type in acceptedFiles #1178
Conversation
@aslan-alt we cannot do this because the type of the files depends on what the |
Pull Request Test Coverage Report for Build 437f9957b0d2dbc07b057757c7425326eeb8cedb-PR-1178
💛 - Coveralls |
4f25d6a
to
d164104
Compare
typings/react-dropzone.d.ts
Outdated
draggedFiles: (File & { path?: string })[]; | ||
acceptedFiles: (File & { path?: string })[]; |
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.
Isn't FileWithPath
the same thing?
draggedFiles: (File & { path?: string })[]; | |
acceptedFiles: (File & { path?: string })[]; | |
draggedFiles: FileWithPath[]; | |
acceptedFiles: FileWithPath[]; |
Could you try that and see if you still get errors?
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.
yeah,I always see this error, see this demo
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.
@aslan-alt could you update to v14 and see if the same issue happens? I'll take a look later this week.
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 just tried it out and if you set:
acceptedFiles: FileWithPath[];
as suggested, the error is gone.
So please update that and also set the FileRejection.file
prop type to the same type.
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.
okay
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.
need approve
7e5235d
to
8bae3a1
Compare
8bae3a1
to
f8f5a42
Compare
👀 |
Any update on when this will be merged? |
Will this PR be merged? I noticed that this project hasn't accepted any new PRs for the past two years. guys, what's going on? |
What kind of change does this PR introduce?
Did you add tests for your changes?
If relevant, did you update the documentation?
Summary
fix ts error
Does this PR introduce a breaking change?
No
Other information