Skip to content
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

FileFilterMethod typescript definition wrong #425

Closed
lughino opened this issue Nov 11, 2022 · 1 comment · Fixed by #426
Closed

FileFilterMethod typescript definition wrong #425

lughino opened this issue Nov 11, 2022 · 1 comment · Fixed by #426
Assignees
Labels
bug Something isn't working typings

Comments

@lughino
Copy link

lughino commented Nov 11, 2022

Recommended - Check out the discussions area before opening a new issue.

Describe the bug
The typescript definition of FileFilterMethod seems to be wrong.
It states that accepts 3 arguments, but it receives only one argument.

The typescript signature is actually useful.
I was trying to filter the number of files accepted when I drag multiple files.
The problem is that there is no way for me to know how many files have been already added to the batch, and the multiple option works only on file input, so I cannot limit the number of files uploaded when the user use the drag and drop feature.

To Reproduce
Steps to reproduce the behavior:
Check FileFilterMethod with the actual implementation.

Expected behavior
Receive the other two arguments in order to successfully filter the files when using drag and drop

Versions
1.2.0

Code
Please provide code sample or better yet, a link to a reproducing repository or best yet, codesandbox (fiddle, etc) where issue can be reproduced easily

@yoavniran yoavniran self-assigned this Nov 12, 2022
@yoavniran yoavniran added bug Something isn't working typings labels Nov 12, 2022
@yoavniran
Copy link
Collaborator

thanks @lughino, good catch.
I will add a fix to the 1.3.0 RC shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants