streamich/react-use

useEnsuredForwardedRef not working with callback refs

Aperta

#805 aperta il 26 nov 2019

 (2 commenti) (1 reazione) (0 assegnatari)TypeScript (3273 fork)batch import
bughelp wanted

Metriche repository

Star
 (43.979 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor