How to get open function from ref when using useDropzone hook
See original GitHub issueOn latest version of react-dropzone v10.x.x
- I want to triage a possible bug
What is the current behavior? When I’m calling
const { getRootProps, getInputProps, rootRef, inputRef } = useDropzone({
accept,
onDrop,
multiple: false,
});
Neither rootRef nor inputRef have a property called open
.
Is the open function for opening the file dialog from outside somewhere else?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
react-dropzone
The useDropzone hook just binds the necessary handlers to create a drag 'n' drop zone. Use the getRootProps() fn to get the props...
Read more >React js react-dropzone automatic opening when the page is ...
Through useImperativeHandle , that ref has one property which is upload -- a function that returns either an input element or null ....
Read more >Examples - react-dropzone
The useDropzone hook just binds the necessary handlers to create a drag 'n' drop zone. Use the getRootProps() fn to get the props...
Read more >react-dropzone - npm
You can either use the hook: import React, {useCallback} from 'react' import {useDropzone} from 'react-dropzone' function MyDropzone() ...
Read more >React Dropzone and File Uploads in React - Upmostly
If you don't have an existing React project that uses the react-dropzone library, ... As an extra challenge, try to follow this tutorial...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just found out that is in the returned object of useDropzone. That probably should be mentioned in the Ref section of the readme, or?
Was not easy to find the project from 1,5 years ago but I made it 😉 https://gist.github.com/valoricDe/712155a659d50b48f41b0d79a22d043e