MCPcopy
hub / github.com/react-grid-layout/react-grid-layout / getLayoutItem

Function getLayoutItem

src/core/layout.ts:43–54  ·  view source on GitHub ↗
(
  layout: Layout,
  id: string
)

Source from the content-addressed store, hash-verified

41 * @returns The layout item, or undefined if not found
42 */
43export function getLayoutItem(
44 layout: Layout,
45 id: string
46): LayoutItem | undefined {
47 for (let i = 0; i < layout.length; i++) {
48 const item = layout[i];
49 if (item !== undefined && item.i === id) {
50 return item;
51 }
52 }
53 return undefined;
54}
55
56/**
57 * Get all static items from the layout.

Callers 4

GridLayoutFunction · 0.85
useGridLayoutFunction · 0.85
withLayoutItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…