Blocking background content and focus on modal. I am using mdbreact. 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.
Blocking background content and focus on modal
1.4k Views Asked by Paul At
2
There are 2 best solutions below
0
On
I used disableBackdrop prop from MDBReact as the following:
<Modal disableBackdrop="true" ... />
For more info you can read here: https://mdbootstrap.com/docs/react/modals/basic/#docsTabsAPI
You can use the css pseudo element
::backdrop: https://developer.mozilla.org/en-US/docs/Web/CSS/::backdropIt will place
So if you have a dialog modal for example it is perfect to prevent any click in the background.