MCPcopy Create free account
hub / github.com/github/docs / loadMore

Function loadMore

components/guides/ArticleCards.tsx:38–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 const loadMore = () => {
39 if (articleCardRef.current) {
40 const childListLength = articleCardRef.current.childElementCount
41 // Leading semi-colon due to prettier to prevent possible ASI failures
42 // Need to explicitly type assert as HTMLDivElement as focus property missing from dom type definitions for Element.
43 ;(articleCardRef.current.childNodes.item(childListLength - 1) as HTMLDivElement).focus()
44 }
45 setNumVisible(numVisible + PAGE_SIZE)
46 }
47
48 const isUserFiltering = typeFilter !== undefined || topicFilter !== undefined
49

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected