Passing more than 1 parameter to onDrop
See original GitHub issueHi,
Is there a way to accept 2 or more parameters in the onDrop method? I need to also pass an id from the current row of the table.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Sending additional parameter with dropzone.js - Stack Overflow
I am trying to add dropzone.js and I'd like to pass another parameter with file, so I ...
Read more >ondrop Event - W3Schools
The ondrop event occurs when a draggable element or text selection is dropped on a valid drop ... ondragover, A dragged element is...
Read more >react-dropzone
Simple React hook to create a HTML5-compliant drag'n'drop zone for files. Documentation and examples at https://react-dropzone.js.org.
Read more >3 Ways of Passing Multiple Parameters to the onClick Handler ...
#1. Using an inline arrow function. Following the example from above, a very simple way of passing multiple attributes to your handler, ...
Read more >React Dropzone and File Uploads in React - Upmostly
React Dropzone only needs one method passed into the onDrop prop to handle ... label to show something different when a file is...
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 Free
Top 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

Here is an example:
and your function could look like
Hope that helps.
@elebumm, I am using the hook but unable to pass a second parameter to the onDrop. The
useDropzonebeing a hook is declared at the top but the parameter I wish to pass (a column id) is only available inside an Array.map() call inside the render block.Do you have an idea how I can achieve my goal?
Edit: Found it! The onDrop method signature has to be adjusted inside the
getRootPropsfunction call.