streamich/react-use

useEnsuredForwardedRef not working with callback refs

Open

#805 geöffnet am 26. Nov. 2019

Auf GitHub ansehen
 (2 Kommentare) (1 Reaktion) (0 zugewiesene Personen)TypeScript (43.979 Stars) (3.273 Forks)batch import
bughelp wanted

Beschreibung

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.

Contributor Guide