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

Function getInputHistoryState

dash/dash-renderer/src/reducers/reducer.js:93–113  ·  view source on GitHub ↗
(payload, state, recordChanges)

Source from the content-addressed store, hash-verified

91}
92
93function getInputHistoryState(payload, state, recordChanges) {
94 const {graphs, paths, layout} = state;
95 const {itempath, props} = payload;
96 const refProps = path(itempath.concat(['props']), layout) || {};
97 const {id} = refProps;
98
99 let historyEntry;
100 if (id) {
101 if (recordChanges) {
102 state.changed = {id, props};
103 }
104
105 historyEntry = {id, props: {}};
106 keys(props).forEach(propKey => {
107 if (getCallbacksByInput(graphs, paths, id, propKey).length) {
108 historyEntry.props[propKey] = refProps[propKey];
109 }
110 });
111 }
112 return historyEntry;
113}
114
115function recordHistory(reducer) {
116 return function (state, action) {

Callers 1

recordHistoryFunction · 0.85

Calls 1

getCallbacksByInputFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…