streamich/react-use

useEnsuredForwardedRef not working with callback refs

Ouverte

#805 ouverte le 26 nov. 2019

 (2 commentaires) (1 réaction) (0 personne assignée)TypeScript (3 273 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (43 979 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

If the forwarded ref is a callback ref the callback isn't called properly.

useEnsuredForwardedRef should check if the passed ref is a callback-function and if that's the case call it to set the ref.

Guide contributeur