reactjs/react-modal

overlayRef and contentRef are undefined on componentDidMount

Open

#740 geöffnet am 22. Feb. 2019

Auf GitHub ansehen
 (14 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (828 Forks)batch import
easygood first issuemaybe bugmissing documentation

Repository-Metriken

Stars
 (7.294 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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

Contributor Guide