Skip to content

Commit ee49895

Browse files
committed
Fix #22: Reset file input when clearing file
1 parent d78032a commit ee49895

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/form.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ export class FormFileInput extends React.Component {
421421
};
422422

423423
this.props.onChange(event);
424+
425+
if (this.inputRef.current)
426+
this.inputRef.current.value = '';
424427
}
425428
}
426429

0 commit comments

Comments
 (0)