Topic: MDB file does not set ref or name to input
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
Roman Mzh pro premium 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.
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 pro premium 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.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- 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