* 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)
| 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. |
no outgoing calls