Skip to content

Commit e91fd7b

Browse files
committed
GAME-201 #comment fix file picker reset
1 parent 8f3dc43 commit e91fd7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src-ts/lib/form/form-groups/form-input/input-file-picker/InputFilePicker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ const InputFilePicker: FC<InputFilePickerProps> = (props: InputFilePickerProps)
4646
className={styles.filePickerButton}
4747
label={fileName ? 'Clear' : 'Browse'}
4848
onClick={() => {
49-
if (fileName) {
49+
if (fileName && fileInputRef.current) {
5050
setFiles(null)
51+
fileInputRef.current.value = ''
5152
props.onChange(null)
5253
} else {
5354
fileInputRef.current?.click()

0 commit comments

Comments
 (0)