We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
setProps
createAppStore
1 parent 647ee9f commit 78ccd87Copy full SHA for 78ccd87
dash/dash-renderer/src/observers/setProps.ts
dash/dash-renderer/src/utils/setProps.ts
@@ -0,0 +1,22 @@
1
+import {updateProps, notifyObservers} from '../actions/index';
2
+
3
+const makeSetProps = ({dispatch, getState}) => {
4
+ const setProps = (updates: {}) => {
5
+ const {paths} = getState();
6
+ Object.entries(updates).forEach(([componentId, props]) => {
7
+ const componentPath = paths.strs[componentId];
8
+ dispatch(
9
+ updateProps({
10
+ props,
11
+ itempath: componentPath
12
+ })
13
+ );
14
+ dispatch(notifyObservers({id: componentId, props}));
15
+ });
16
+ };
17
18
+ window.dash_clientside = window.dash_clientside || {};
19
+ window.dash_clientside['setProps'] = setProps;
20
+};
21
22
+export default makeSetProps;
0 commit comments