@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
2 lines (1 loc) • 323 B
JavaScript
import{useRef as e,useCallback as t,useEffect as r}from"react";const c=({index:c,setRowHeight:i,delay:n})=>{const o=e(),u=t((()=>{o.current&&(n?setTimeout((()=>{i(c,o?.current?.clientHeight)}),n):i(c,o.current.clientHeight))}),[n,c,i]);return r((()=>{u()}),[u]),{rowRef:o,calculateRowHeight:u}};export{c as useRowChanged};