reactjs/react-modal

overlayRef and contentRef are undefined on componentDidMount

Open

#740 创建于 2019年2月22日

在 GitHub 查看
 (14 评论) (0 反应) (0 负责人)JavaScript (7,294 star) (828 fork)batch import
easygood first issuemaybe bugmissing documentation

描述

Summary:

overlayRef and contentRef are undefined on componentDidMount, but have the correct value on componentDidUpdate.

Steps to reproduce:

  1. Set the overlayRef and contentRef prop on ReactModal.

  2. console.log the value of overlayRef and contentRef inside componentDidMount.

  3. The values will be undefined.

Expected behavior:

overlayRef and contentRef should hold the correct values on componentDidMount.

Link to example of issue:

https://codesandbox.io/s/qq9kpwxxp9

贡献者指南