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

Function applyProps

dash/dash-renderer/src/observers/executedCallbacks.ts:50–79  ·  view source on GitHub ↗
(id: any, updatedProps: any)

Source from the content-addressed store, hash-verified

48 } = getState();
49
50 function applyProps(id: any, updatedProps: any) {
51 const {layout, paths} = getState();
52 const itempath = getPath(paths, id);
53 if (!itempath) {
54 return false;
55 }
56
57 // This is a callback-generated update.
58 // Check if this invalidates existing persisted prop values,
59 // or if persistence changed, whether this updates other props.
60 updatedProps = prunePersistence(
61 path(itempath, layout),
62 updatedProps,
63 dispatch
64 );
65
66 // In case the update contains whole components, see if any of
67 // those components have props to update to persist user edits.
68 const {props} = applyPersistence({props: updatedProps}, dispatch);
69 (dispatch as ThunkDispatch<any, any, AnyAction>)(
70 updateProps({
71 itempath,
72 props,
73 source: 'response',
74 renderType: 'callback'
75 })
76 );
77
78 return props;
79 }
80
81 let requestedCallbacks: ICallback[] = [];
82 const storedCallbacks: IStoredCallback[] = [];

Callers 1

Calls 5

getPathFunction · 0.90
prunePersistenceFunction · 0.90
applyPersistenceFunction · 0.90
updatePropsFunction · 0.90
getStateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…