MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / fetchData

Function fetchData

frontend/src/components/recordPage/index.tsx:279–296  ·  view source on GitHub ↗
(collectionId: string, params: Record<string, any>)

Source from the content-addressed store, hash-verified

277 setFileId('')
278 }
279 const fetchData = async (collectionId: string, params: Record<string, any>) => {
280 setLoading(true);
281 try {
282 const res: any = await getRecordsList(collectionId, params)
283 const data = res.data.map((item: any) => {
284 return {
285 ...item,
286 key: item.record_id
287 }
288 })
289 setRecordList(data);
290 setHasMore(res.has_more)
291
292 } catch (error) {
293 console.log(error)
294 }
295 setLoading(false);
296 };
297 const handleCreatePrompt = () => {
298 setContentValue('')
299 setTitle('')

Callers 4

handleChildEventFunction · 0.70
RecordPageFunction · 0.70
onDeleteConfirmFunction · 0.70
handleConfirmFunction · 0.70

Calls 2

getRecordsListFunction · 0.90
setLoadingFunction · 0.85

Tested by

no test coverage detected