reactjs/react-modal

overlayRef and contentRef are undefined on componentDidMount

Ouverte

#740 ouverte le 22 févr. 2019

 (14 commentaires) (0 réaction) (0 personne assignée)JavaScript (828 forks)batch import
easygood first issuemaybe bugmissing documentation

Métriques du dépôt

Stars
 (7 294 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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

Guide contributeur