@@ -24,7 +24,12 @@ import {DashConfig} from '../config';
24
24
import { notifyObservers , onError , updateProps } from '../actions' ;
25
25
import { getWatchedKeys , stringifyId } from '../actions/dependencies' ;
26
26
import { recordUiEdit } from '../persistence' ;
27
- import { createElement , getComponentLayout , isDryComponent } from './wrapping' ;
27
+ import {
28
+ createElement ,
29
+ getComponentLayout ,
30
+ isDryComponent ,
31
+ checkRenderTypeProp
32
+ } from './wrapping' ;
28
33
import Registry from '../registry' ;
29
34
import isSimpleComponent from '../isSimpleComponent' ;
30
35
import {
@@ -72,7 +77,7 @@ function DashWrapper({
72
77
73
78
// Select both the component and it's props.
74
79
// eslint-disable-next-line prefer-const
75
- let [ component , componentProps , h , changedProps ] = useSelector (
80
+ let [ component , componentProps , h , changedProps , renderType ] = useSelector (
76
81
selectDashProps ( componentPath ) ,
77
82
selectDashPropsEqualityFn
78
83
) ;
@@ -215,7 +220,15 @@ function DashWrapper({
215
220
const extraProps = {
216
221
setProps,
217
222
...extras
218
- } ;
223
+ } as { [ key : string ] : any } ;
224
+
225
+ if ( checkRenderTypeProp ( component ) ) {
226
+ extraProps [ 'renderType' ] = newRender . current
227
+ ? 'parent'
228
+ : changedProps
229
+ ? renderType
230
+ : 'parent' ;
231
+ }
219
232
220
233
const setHydratedProps = ( component : any , componentProps : any ) => {
221
234
// Hydrate components props
0 commit comments