Skip to content

Commit dd28a8d

Browse files
committedJun 30, 2020
fix: CModal: fix animation when rendered through portal
1 parent 5eac06b commit dd28a8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎src/modal/CModal.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const getTransitionClass = s => {
1111
s === 'exiting' ? 'd-block' : ''
1212
}
1313

14+
//animation fixes introduced thanks to Sirlordt
1415
//component - CoreUI / CModal
1516
const CModal = props => {
1617

@@ -31,7 +32,7 @@ const CModal = props => {
3132
...attributes
3233
} = props
3334

34-
const [isOpen, setIsOpen] = useState(show)
35+
const [isOpen, setIsOpen] = useState(false)
3536
const modalClick = e => e.target.dataset.modal && closeOnBackdrop && close()
3637

3738
useEffect(() => {

0 commit comments

Comments
 (0)
Please sign in to comment.