You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if a user uses the FileInput component with a ref to expose the imperative handle to allow for clearing files through some clear method, once the file is cleared and the user attempt to upload a new file, the new file will not upload.
The handle event will not fire at all.
this is because the exposed clear files function simply clears the state of the files tracked by the component but does not clear the inputs value.
Since the inputs value is not cleared, and is the same value as the previous event, a new event is not fired.
ReactUSWDS Version & USWDS Version:
ReactUSWDS: Most current
USWDS: 3.7.1
Describe the bug
Currently, if a user uses the FileInput component with a ref to expose the imperative handle to allow for clearing files through some clear method, once the file is cleared and the user attempt to upload a new file, the new file will not upload.
The handle event will not fire at all.
this is because the exposed clear files function simply clears the state of the files tracked by the component but does not clear the inputs value.
Since the inputs value is not cleared, and is the same value as the previous event, a new event is not fired.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The onChange event fires and the file has a preview
Screenshots
Additional context
Device and Browser Information (please complete the following information if describing a UI bug):
The text was updated successfully, but these errors were encountered: