(id: any, updatedProps: any)
| 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[] = []; |
no test coverage detected
searching dependent graphs…