MCPcopy Create free account
hub / github.com/PageAI-Pro/page-ui / trigger

Function trigger

components/blog/StepCode.tsx:18–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 const { current } = ref;
17
18 const trigger = () => {
19 const currentPre = current.querySelector('pre');
20
21 if (!currentPre) return;
22
23 const hasOverflow = currentPre.scrollHeight > currentPre.clientHeight;
24 setIsOverflow(hasOverflow);
25
26 if (callback) callback(hasOverflow);
27 };
28
29 if (current) {
30 trigger();

Callers 1

useIsOverflowingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected