MCPcopy Create free account
hub / github.com/dailydotdev/apps / setScrollRef

Function setScrollRef

packages/shared/src/components/dropdown/DropdownMenu.tsx:217–220  ·  view source on GitHub ↗
(node: HTMLDivElement | null)

Source from the content-addressed store, hash-verified

215 const scrollRef = useRef<HTMLDivElement | null>(null);
216 const detachDrag = useRef<() => void>();
217 const setScrollRef = (node: HTMLDivElement | null) => {
218 scrollRef.current = node;
219 scrollFadeRef(node);
220 };
221 // Radix mounts the content from its own open state, not from a render
222 // of this wrapper, so an effect here can run before the panel exists.
223 // The ref callback sees the node the moment it arrives. Stable, or

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected