You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to pass more than three parameters to onDrop function? I mean i have access to accepted, rejected an synthetic event. But i need to pass an ID too and i can't figure out how.
Here's my code. As you can see i console.log(event.target.id) but it's always 1. But when i console.log(uploadable.id) it is 2
`import React, { useEffect, useState, useCallback, useMemo } from 'react';
import { useDropzone } from 'react-dropzone';
import Header2 from '../layout/header2';
import Sidebar from '../layout/sidebar';
import Footer2 from '../layout/footer2';
import axios from '../../axiosConfig'
import ContentBody from '../element/contentBody';
import lang from '../../langObject'
Is there a way to pass more than three parameters to onDrop function? I mean i have access to accepted, rejected an synthetic event. But i need to pass an ID too and i can't figure out how.
Here's my code. As you can see i console.log(event.target.id) but it's always 1. But when i console.log(uploadable.id) it is 2
`import React, { useEffect, useState, useCallback, useMemo } from 'react';
import { useDropzone } from 'react-dropzone';
import Header2 from '../layout/header2';
import Sidebar from '../layout/sidebar';
import Footer2 from '../layout/footer2';
import axios from '../../axiosConfig'
import ContentBody from '../element/contentBody';
import lang from '../../langObject'
const language = localStorage.getItem('language')
const baseStyle = {
flex: 1,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
padding: '20px',
borderWidth: 2,
borderRadius: 2,
borderColor: '#eeeeee',
borderStyle: 'dashed',
background: 'transparent',
color: '#9d9d9d',
outline: 'none',
transition: 'border .24s ease-in-out'
};
const activeStyle = {
borderColor: '#2196f3'
};
const acceptStyle = {
borderColor: '#00e676'
};
const rejectStyle = {
borderColor: '#ff1744'
};
function DocumentsCreateUser() {
const [uploadables, setUploadables] = useState([])
const ref = useRef()
const [files, setFiles] = useState([])
}
export default DocumentsCreateUser`
The text was updated successfully, but these errors were encountered: