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

Function handleOneId

dash/dash-renderer/src/actions/dependencies.js:1317–1360  ·  view source on GitHub ↗
(id, outIdCallbacks, inIdCallbacks)

Source from the content-addressed store, hash-verified

1315 }
1316
1317 function handleOneId(id, outIdCallbacks, inIdCallbacks) {
1318 if (outIdCallbacks) {
1319 for (const property in outIdCallbacks) {
1320 const cb = getCallbackByOutput(graphs, paths, id, property);
1321 if (cb) {
1322 // callbacks found in the layout by output should always run
1323 // unless specifically requested not to.
1324 // ie this is the initial call of this callback even if it's
1325 // not the page initialization but just a new layout chunk
1326 if (!cb.callback.prevent_initial_call) {
1327 cb.initialCall = true;
1328 addCallback(cb);
1329 }
1330 }
1331 }
1332 }
1333 if (!outputsOnly && inIdCallbacks) {
1334 const maybeAddCallback = removedArrayInputsOnly
1335 ? addCallbackIfArray(stringifyId(id))
1336 : addCallback;
1337 let handleThisCallback = maybeAddCallback;
1338 if (chunkPath) {
1339 handleThisCallback = cb => {
1340 if (
1341 !all(
1342 startsWith(chunkPath),
1343 pluck('path', flatten(cb.getOutputs(paths)))
1344 )
1345 ) {
1346 maybeAddCallback(cb);
1347 }
1348 };
1349 }
1350 for (const property in inIdCallbacks) {
1351 getCallbacksByInput(
1352 graphs,
1353 paths,
1354 id,
1355 property,
1356 INDIRECT
1357 ).forEach(handleThisCallback);
1358 }
1359 }
1360 }
1361
1362 crawlLayout(layoutChunk, child => {
1363 const id = path(['props', 'id'], child);

Callers 1

Calls 5

getCallbacksByInputFunction · 0.90
getCallbackByOutputFunction · 0.85
addCallbackFunction · 0.85
addCallbackIfArrayFunction · 0.85
stringifyIdFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…