Blocking background content and focus on modal


Topic: Blocking background content and focus on modal

Paul TP asked 2 years ago

Blocking background content and focus on modal. I am using mdbreact pro. I have a table that has a delete and edit buttons in each row and I do not want the user to click these buttons when the modal is shown up.


Krzysztof Wilk staff answered 2 years ago

Hi!

You can use disableBackdrop prop.

<Modal disableBackdrop="true" ... />

More you can read here: https://mdbootstrap.com/docs/react/modals/basic/#docsTabsAPI


Paul TP commented 2 years ago

 <MDBModal isOpen={editModalState} toggle={updateUser(editData)} size={'lg'} backdrop={false} disableBackdrop={true}>

This is not working for me. Am I doing something wrong


Paul TP commented 2 years ago

Never mind I figured out, removing backdrop or setting it to true solved my problem, disableBackdrop works well when the backdrop is set to true.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.26.0
  • Device: Laptop
  • Browser: chrome
  • OS: fedora 31
  • Provided sample code: No
  • Provided link: No
Tags