Hi,
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.
You're passing a function that you own. Just make this function accept all needed parameters.
This is closed but the only answer is "You're passing a function that you own. Just make this function accept all needed parameters." - can you give a code sample? If I pass a parameter to my "function that I own" for the onDrop event it overwrites the 'files' parameter with my parameter and this is a no no....
Here is an example:
<Dropzone onDrop={(accepted, rejected) => {this.onDrop(accepted, rejected, 'third')}}>
<p>Drop files here...</p>
</Dropzone>
and your function could look like
onDrop(accepted, rejected, myArgument) {
console.log(accepted, rejected, myArgument)
}
Hope that helps.
Most helpful comment
Here is an example:
and your function could look like
Hope that helps.