InputFile does not trigger onChange event (React version)


Topic: InputFile does not trigger onChange event (React version)

rmedrano23 pro asked 6 years ago

I am trying to use InputFile in a React component  but seems that the onChange event is not triggered when a file is selected by the user.I just simply useImport { InputFile }and in a form <InputFile multiple btnColor=\\\\\\\"info\\\\\\\" onChange={e=>console.log(e.target.files)}/> Is onChange event the correct one to get the file names and update my component state?

Mikołaj Smoleński staff answered 6 years ago

Hi rmedrano, Thanks for Your remarks! We'll add onChange event to FileInput as soon as possible. Best Regards

rmedrano23 pro commented 6 years ago

Thanks for your response.

rmedrano23 pro commented 6 years ago

Hi! Any news about this bug?

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No