From f72b7ec723e069546fb9fcc1836ed460f378e291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B8egh?= Date: Fri, 13 Dec 2024 13:44:54 +0100 Subject: [PATCH] Remove unmount logic from Upload component --- packages/dnb-eufemia/src/components/upload/Upload.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/dnb-eufemia/src/components/upload/Upload.tsx b/packages/dnb-eufemia/src/components/upload/Upload.tsx index bbae2be220f..67d82d287e4 100644 --- a/packages/dnb-eufemia/src/components/upload/Upload.tsx +++ b/packages/dnb-eufemia/src/components/upload/Upload.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from 'react' +import React, { useCallback } from 'react' import classnames from 'classnames' // Shared @@ -76,12 +76,6 @@ const Upload = (localProps: UploadAllProps) => { const { files, setFiles, setInternalFiles, getExistingFile } = useUpload(id) - useEffect(() => { - return () => { - setFiles([]) - } - }, []) - const onInputUpload = useCallback( (newFiles: Array) => { const mergedFiles = [