djorg83 / react-bootstrap-sweetalert

A React implementation of SweetAlert

Home Page:https://djorg83.github.io/react-bootstrap-sweetalert/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Click allowed in overlay

CicheR opened this issue · comments

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

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)

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