streamich/react-use

useEnsuredForwardedRef not working with callback refs

Open

#805 aperta il 26 nov 2019

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

Metriche repository

Star
 (43.979 star)
Metriche merge PR
 (Merge medio 1743g 9h) (1 PR mergiata in 30 g)

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