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

onChange not working ?

Open karborator opened this issue 3 years ago • 0 comments

I'm able to click on the input and choose a file but then nothing happens, it seems onChange is never fired. Do you have any idea why ?

<FileInput
       name="file"
       accept=".jpg"
       placeholder="Your image"
       className="mdl-textfield__input"
       onChange={this.handleChange.bind(this)}
    />
    ....
    handleChange(event) {
    this.setState({
        'file': event.target.files[0]
    })
};

karborator avatar Jan 08 '23 11:01 karborator