Topic: MDB file does not set ref or name to input

Roman Mzh priority asked 5 years ago


Expected behavior

use DOM api and File api to get file. Pass name or ref to generated file input

Actual behavior

file is reachable only with getValue function


Aliaksandr Andrasiuk staff answered 5 years ago


Hi,

Unfortunately, for now, there is no possibility to use ref's with FileInput component. We can implement it.

Inputs receives inputRef property. But it accepts only Callback Ref :

<MDBInput inputRef={ref => this.myRef = ref } />

We can make name property possible to be passed if it is necessary.

Best regards.


Roman Mzh priority commented 5 years ago

Hello! Name would be great. thx in advance.


Aliaksandr Andrasiuk staff commented 5 years ago

Hi,

Thank you for the response! We definitely will add name as a property.

Best regards.


Roman Mzh priority answered 5 years ago


Upd#1. Actually none of MDB inputs pass ref.

Is it a feature?

Upd#2. MDB select does not pass a name too.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: 4.18.0
  • Device: pc
  • Browser: chrome
  • OS: ubuntu 18.04
  • Provided sample code: No
  • Provided link: No