MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / find

Method find

src/utils.ts:332–334  ·  view source on GitHub ↗

* Find a grid node by its ID. * * @param nodes array of nodes to search * @param id the ID to search for * @returns the node with matching ID, or undefined if not found * * @example * const node = Utils.find(nodes, 'widget-1'); * if (node) console.log('Found node at:', node.x

(nodes: GridStackNode[], id: string)

Source from the content-addressed store, hash-verified

330 * if (node) console.log('Found node at:', node.x, node.y);
331 */
332 static find(nodes: GridStackNode[], id: string): GridStackNode | undefined {
333 return id ? nodes.find(n => n.id === id) : undefined;
334 }
335
336 /**
337 * Convert various value types to boolean.

Callers 15

ngAfterViewInitMethod · 0.80
modifyMethod · 0.80
onChangeMethod · 0.80
_mouseDownMethod · 0.80
collideMethod · 0.80
prepareNodeMethod · 0.80
findEmptyPositionMethod · 0.80
addNodeMethod · 0.80
removeNodeMethod · 0.80
moveNodeCheckMethod · 0.80
endUpdateMethod · 0.80
saveMethod · 0.80

Calls

no outgoing calls

Tested by 1

testFunction · 0.64