MCPcopy Create free account
hub / github.com/027xiguapi/code-box / onLoadMore

Function onLoadMore

tabs/history.tsx:107–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 }
106
107 function onLoadMore() {
108 setLoading(true)
109 setList(
110 data.concat(
111 [...new Array(pageSize)].map(() => ({
112 value: "",
113 from: "",
114 loading: true,
115 expand: false
116 }))
117 )
118 )
119 pageNumber += 1
120 let records = paginate()
121 const newData = data.concat(records)
122 setData(newData)
123 setList(newData)
124 setLoading(false)
125 window.dispatchEvent(new Event("resize"))
126 }
127
128 const loadMore =
129 !initLoading && !loading && isMore ? (

Callers

nothing calls this directly

Calls 1

paginateFunction · 0.85

Tested by

no test coverage detected