Projekt

Obecné

Profil

« Předchozí | Další » 

Revize bb91c23f

Přidáno uživatelem Jaroslav Hrubý před asi 2 roky(ů)

Document upload improved

Zobrazit rozdíly:

webapp/components/modals/AddDocumentModal.tsx
32 32
    };
33 33

  
34 34
    const [upload, setUpload] = React.useState(false);
35
    const tempDocs: DocumentAddInfo[] = [];
35
    const [tempDocs, setTempDocs] = React.useState<DocumentAddInfo[]>([]);
36 36

  
37 37
    const handleUpload = () => {
38 38
        if (tempDocs.length !== 0) {
......
64 64
                const index = tempDocs.indexOf(docInfo);
65 65
                const newFileList = tempDocs.slice();
66 66
                newFileList.splice(index, 1);
67
                setTempDocs(newFileList);
67 68
            }
68 69
        },
69 70
        beforeUpload: (file: any) => {
......
106 107
                </Button>,
107 108
            ]}
108 109
        >
109
            <Dragger {...props} accept={'.txt, .zip, .html'}>
110
            <Dragger {...props} accept={'.txt, .zip, .html'} maxCount={10}>
110 111
                <p className="ant-upload-drag-icon">
111 112
                    <InboxOutlined />
112 113
                </p>

Také k dispozici: Unified diff