Skip to content

Commit 889b4a5

Browse files
committed
removed the new prop being passed down: rendertype
1 parent 5c6dbc3 commit 889b4a5

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

dash/dash-renderer/src/reducers/reducer.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,15 @@ function adjustHashes(state, action) {
3131
const actionPath = action.payload.itempath;
3232
const strPath = stringifyPath(actionPath);
3333
const prev = pathOr(0, [strPath, 'hash'], state);
34-
state = assoc(strPath, {hash: prev + 1,
35-
changedProps: action.payload.props, renderType: action.payload.renderType}, state);
34+
state = assoc(
35+
strPath,
36+
{
37+
hash: prev + 1,
38+
changedProps: action.payload.props,
39+
renderType: action.payload.renderType
40+
},
41+
state
42+
);
3643
return state;
3744
}
3845

dash/dash-renderer/src/wrapper/DashWrapper.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function DashWrapper({
7272

7373
// Select both the component and it's props.
7474
// eslint-disable-next-line prefer-const
75-
let [component, componentProps, h, changedProps, renderType] = useSelector(
75+
let [component, componentProps, h, changedProps] = useSelector(
7676
selectDashProps(componentPath),
7777
selectDashPropsEqualityFn
7878
);
@@ -214,8 +214,6 @@ function DashWrapper({
214214

215215
const extraProps = {
216216
setProps,
217-
rendertype: newRender.current ? 'parent' : (
218-
changedProps ? renderType : 'parent'),
219217
...extras
220218
};
221219

@@ -236,7 +234,8 @@ function DashWrapper({
236234
.split('.')[0]
237235
.replace('[]', '')
238236
.replace('{}', '') in changedProps ||
239-
newRender.current || !h
237+
newRender.current ||
238+
!h
240239
) {
241240
childNewRender = Date.now();
242241
}
@@ -449,9 +448,7 @@ function DashWrapper({
449448
hydratedChildren = wrapChildrenProp(
450449
componentProps.children,
451450
['children'],
452-
!h ||
453-
newRender.current ||
454-
'children' in changedProps
451+
!h || newRender.current || 'children' in changedProps
455452
? Date.now()
456453
: 0
457454
);

dash/dash-renderer/src/wrapper/selectors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ export const selectDashProps =
1515
const hash = state.layoutHashes[strPath];
1616
let h = 0;
1717
let changedProps: object = {};
18-
let renderType: string = '';
18+
let renderType = '';
1919
if (hash) {
2020
h = hash['hash'];
2121
changedProps = hash['changedProps'];
22-
renderType = hash['renderType']
22+
renderType = hash['renderType'];
2323
}
2424
return [c, c?.props, h, changedProps, renderType];
2525
};

0 commit comments

Comments
 (0)