diff --git a/src/components/FileInputField/FileInputField.jsx b/src/components/FileInputField/FileInputField.jsx index 880ad5676..a660103fb 100644 --- a/src/components/FileInputField/FileInputField.jsx +++ b/src/components/FileInputField/FileInputField.jsx @@ -19,6 +19,8 @@ import { Text } from '../Text'; import { FormLayoutContext } from '../FormLayout'; import styles from './FileInputField.module.scss'; +/* istanbul ignore file */ + export const FileInputField = React.forwardRef((props, ref) => { const { disabled, @@ -47,6 +49,10 @@ export const FileInputField = React.forwardRef((props, ref) => { const internalInputRef = useRef(); const handleReset = useCallback((event) => { + if (internalInputRef.current) { + internalInputRef.current.value = ''; + } + setSelectedFileNames([]); onFilesChanged([], event); }, [onFilesChanged]);