MCPcopy Create free account
hub / github.com/Datakitpage/Datakit / getLoadingData

Function getLoadingData

frontend/src/components/data-grid/DataPreviewGrid.tsx:226–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

224
225 // Generate loading skeleton data
226 const getLoadingData = () => {
227 const columnCount = columns?.length || 10;
228 const headers = [
229 ' ',
230 ...Array.from({ length: columnCount }, (_, i) =>
231 String.fromCharCode(65 + i)
232 ),
233 ];
234 const rows = [headers];
235
236 for (let i = 1; i <= 25; i++) {
237 const row = [i.toString()];
238 for (let j = 1; j < headers.length; j++) {
239 row.push(''); // Empty cells will show skeleton
240 }
241 rows.push(row);
242 }
243
244 return rows;
245 };
246
247 // Show error state
248 if (error) {

Callers 1

DataPreviewGridFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected