(component_id: any, props: any, cb: ICallbackPayload)
| 353 | } |
| 354 | |
| 355 | function updateComponent(component_id: any, props: any, cb: ICallbackPayload) { |
| 356 | return function (dispatch: any, getState: any) { |
| 357 | const {paths, config} = getState(); |
| 358 | const componentPath = getPath(paths, component_id); |
| 359 | if (!componentPath) { |
| 360 | if (!config.suppress_callback_exceptions) { |
| 361 | dispatchError(dispatch)( |
| 362 | 'ID running component not found in layout', |
| 363 | [ |
| 364 | 'Component defined in running keyword not found in layout.', |
| 365 | `Component id: "${stringifyId(component_id)}"`, |
| 366 | 'This ID was used in the callback(s) for Output(s):', |
| 367 | `${cb.output}`, |
| 368 | 'You can suppress this exception by setting', |
| 369 | '`suppress_callback_exceptions=True`.' |
| 370 | ] |
| 371 | ); |
| 372 | } |
| 373 | // We need to stop further processing because functions further on |
| 374 | // can't operate on an 'undefined' object, and they will throw an |
| 375 | // error. |
| 376 | return; |
| 377 | } |
| 378 | dispatch( |
| 379 | updateProps({ |
| 380 | props, |
| 381 | itempath: componentPath, |
| 382 | renderType: 'callback' |
| 383 | }) |
| 384 | ); |
| 385 | dispatch(notifyObservers({id: component_id, props})); |
| 386 | }; |
| 387 | } |
| 388 | |
| 389 | /** |
| 390 | * Update a component props with `running`/`progress`/`set_props` calls. |
no test coverage detected
searching dependent graphs…