We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf7746a commit a9b38b3Copy full SHA for a9b38b3
src/components/form.js
@@ -411,15 +411,17 @@ export class FormFileInput extends React.Component {
411
}
412
413
clearFile = () => {
414
- let event = {
415
- target: {
416
- type: 'text',
417
- value: '',
418
- name: this.props.name
419
- }
420
- };
+ if (window.confirm('Do you want to remove this file?')) {
+ let event = {
+ target: {
+ type: 'text',
+ value: '',
+ name: this.props.name
+ }
421
+ };
422
- this.props.onChange(event);
423
+ this.props.onChange(event);
424
425
426
427
render() {
0 commit comments