We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hello this is my component but when i click in the zone it open the window to choose file after choosing the file it open it again
import { useEffect, useState } from 'react'; import { Dropzone, ExtFile, FileMosaic } from '@files-ui/react'; export const DropZoneComp = ({ setDocuments, }: { setDocuments?: (files: ExtFile[]) => void; }) => { const [files, setFiles] = useState<ExtFile[]>([]); const updateFiles = (incommingFiles: ExtFile[]) => { setFiles(incommingFiles); setDocuments?.(files); }; const removeFile = (id: number | string | undefined) => { setFiles(files.filter((x) => x.id !== id)); }; return ( <div className="flex flex-col max-w-full overflow-hidden"> <Dropzone maxFileSize={20000} value={files} onChange={updateFiles}> {files.length > 0 && files.map((file: ExtFile) => ( <FileMosaic {...file} onDelete={removeFile} key={file.id} info preview /> ))} </Dropzone> </div> ); }; export default DropZoneComp;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hello
this is my component but when i click in the zone it open the window to choose file after choosing the file it open it again
The text was updated successfully, but these errors were encountered: