streamich/react-use

useEnsuredForwardedRef not working with callback refs

開放

#805 建立於 2019年11月26日

 (2 則留言) (1 個反應) (0 位負責人)TypeScript (3,273 個分叉)batch import
bughelp wanted

倉庫指標

星標
 (43,979 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南