reactjs/react-modal

overlayRef and contentRef are undefined on componentDidMount

オープン

#740 opened on 2019/02/22

 (14 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (828 件のフォーク)batch import
easygood first issuemaybe bugmissing documentation

Repository metrics

Stars
 (7,294 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド