react-file-reader icon indicating copy to clipboard operation
react-file-reader copied to clipboard

Click event submit form in case I use button element

Open Enase opened this issue 7 years ago • 0 comments

Could you change click event in a way to prevent default action?

https://github.com/GrillWork/react-file-reader/blob/master/ReactFileReader.js#L11

  clickInput = (e) => {
    e.preventDefault()
    let element = document.getElementById(this.state.elementId);
    element.value = '';
    element.click();
  }

Enase avatar Aug 28 '18 10:08 Enase