djorg83 / react-bootstrap-sweetalert

A React implementation of SweetAlert
https://djorg83.github.io/react-bootstrap-sweetalert/
MIT License
253 stars 55 forks source link

Click allowed in overlay #64

Open CicheR opened 4 years ago

CicheR commented 4 years ago

The code consists of a table with clickables TRs and a DeleteButton: code image

When the SweetAlert is shown in modal mode, the background is still clickable, but the click event responds to the last row clicked.

error preview

There is also an error in the console: console error

CodeSandbox CodeSandbox preview GitHub

kristian-94 commented 4 years ago

I also get that console error,


Warning: A string ref, "container", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref
    in div (created by Overlay)
    in Overlay (created by SweetAlert)
    in div (created by SweetAlert)
djorg83 commented 4 years ago

I also get that console error,

Warning: A string ref, "container", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref
    in div (created by Overlay)
    in Overlay (created by SweetAlert)
    in div (created by SweetAlert)

^ This warning is resolved in react-bootstrap-sweetalert@5.1.12