|
|
|
@@ -62,6 +62,8 @@ const FileTable = ({ trigger }) => { |
|
|
|
}, [data]); |
|
|
|
|
|
|
|
const getTotalNumberOfPages = (data) => { |
|
|
|
if (data !== null && !data.total) return 1; |
|
|
|
|
|
|
|
return parseInt(data.total) <= PAGE_SIZE_FILES |
|
|
|
? 1 |
|
|
|
: Math.ceil(parseInt(data.total) / PAGE_SIZE_FILES); |
|
|
|
@@ -236,7 +238,7 @@ const FileTable = ({ trigger }) => { |
|
|
|
}, |
|
|
|
}) |
|
|
|
); |
|
|
|
setFile(null) |
|
|
|
setFile(null); |
|
|
|
}; |
|
|
|
|
|
|
|
const input = ( |
|
|
|
@@ -280,7 +282,7 @@ const FileTable = ({ trigger }) => { |
|
|
|
/> |
|
|
|
<CustomModal |
|
|
|
classes="files-viewer-custom-modal" |
|
|
|
open={file && matches} |
|
|
|
open={file !== null && matches !== null ? file && matches : false} |
|
|
|
onCloseModal={() => setFile(null)} |
|
|
|
> |
|
|
|
{file !== null ? ( |