File Input Disable option


Topic: File Input Disable option

ozgehan pro premium asked 5 years ago

Hi,

How can I disable file - input button to prevent user to upload or select new file?

P.S: I am using "File inputs with photo placeholder".

Thanks,


Magdalena Dembna staff premium answered 5 years ago

Unfortunately, we don't have such property right now. But I will add this to our task list. In the meantime, you can try with .preventDefault():

 <mdb-file-input @click.native="handler" circle btnColor="mdb-color" btn-title="add photo" rounded img src="https://mdbootstrap.com/img/Photos/Others/placeholder-avatar.jpg" />

handler(e) {
    if (this.disabled)  e.preventDefault();
}

Kind regards, Magdalena


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
  • User: Pro
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.2.0
  • Device: computer
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No