File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1- import React , { useState , useEffect } from 'react'
1+ import React , { useState , useEffect , useRef } from 'react'
22import PropTypes from 'prop-types'
33import classNames from 'classnames'
44import { Transition } from 'react-transition-group'
@@ -75,13 +75,15 @@ const CModal = props => {
7575 'show' : isOpen || fade
7676 } )
7777
78+ const nodeRef = useRef ( null )
7879 return (
7980 < div onClick = { modalClick } >
8081 < Transition
8182 in = { Boolean ( isOpen ) }
8283 onEntered = { onEntered }
8384 onExited = { onExited }
8485 timeout = { fade ? 150 : 0 }
86+ nodeRef = { nodeRef }
8587 >
8688 { ( status ) => {
8789 let transitionClass = getTransitionClass ( status )
@@ -95,6 +97,7 @@ const CModal = props => {
9597 role = "dialog"
9698 className = { classes }
9799 data-modal = { true }
100+ ref = { nodeRef }
98101 >
99102 < div className = { dialogClasses } role = "document" >
100103 < div
You can’t perform that action at this time.
0 commit comments