MCPcopy Index your code
hub / github.com/plotly/dash / getLayout

Function getLayout

dash/dash-renderer/src/dashApi.ts:21–36  ·  view source on GitHub ↗

* Get the dash props from a component path or id. * * @param componentPathOrId The path or the id of the component to get the props of. * @param propPath Additional key to get the property instead of plain props. * @returns

(componentPathOrId: DashLayoutPath | string)

Source from the content-addressed store, hash-verified

19 * @returns
20 */
21function getLayout(componentPathOrId: DashLayoutPath | string): any {
22 const ds = getStores();
23 for (let y = 0; y < ds.length; y++) {
24 const {paths, layout} = ds[y].getState();
25 let componentPath;
26 if (!Array.isArray(componentPathOrId)) {
27 componentPath = getPath(paths, componentPathOrId);
28 } else {
29 componentPath = componentPathOrId;
30 }
31 const props = path(componentPath, layout);
32 if (props !== undefined) {
33 return props;
34 }
35 }
36}
37
38window.dash_component_api = Object.assign(window.dash_component_api || {}, {
39 ExternalWrapper,

Callers

nothing calls this directly

Calls 3

getStoresFunction · 0.90
getPathFunction · 0.90
getStateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…