streamich/react-use

useEnsuredForwardedRef not working with callback refs

Open

#805 ouverte le 26 nov. 2019

Voir sur GitHub
 (2 commentaires) (1 réaction) (0 assignés)TypeScript (3 273 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (43 979 stars)
Métriques de merge PR
 (Merge moyen 1743j 9h) (1 PR mergée en 30 j)

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