UNPKG

@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) 367 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useRowChanged=({index:t,setRowHeight:r,delay:u})=>{const c=e.useRef(),s=e.useCallback((()=>{c.current&&(u?setTimeout((()=>{r(t,c?.current?.clientHeight)}),u):r(t,c.current.clientHeight))}),[u,t,r]);return e.useEffect((()=>{s()}),[s]),{rowRef:c,calculateRowHeight:s}};