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

Function renderCB

react/lib/grid-stack-render-provider.test.tsx:28–38  ·  view source on GitHub ↗
(element, widget)

Source from the content-addressed store, hash-verified

26
27 // Simulate renderCB
28 const renderCB = (element, widget) => {
29 if (widget.id && widget.grid) {
30 // Get or create the widget container map for this grid instance
31 let containers = gridWidgetContainersMap.get(widget.grid);
32 if (!containers) {
33 containers = new Map();
34 gridWidgetContainersMap.set(widget.grid, containers);
35 }
36 containers.set(widget.id, element);
37 }
38 };
39
40 renderCB(element1, widget1);
41 renderCB(element2, widget2);

Calls

no outgoing calls

Tested by

no test coverage detected