Skip to content

Commit 30e7be2

Browse files
committed
Add comment
1 parent a62d215 commit 30e7be2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/scenes/src/core/SceneComponentWrapper.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ function EmptyRenderer<T>(_: SceneComponentProps<T>): React.ReactElement | null
3232
return null;
3333
}
3434

35+
/**
36+
* If this or any parent has componentWrapper then return and use that
37+
*/
3538
function getComponentWrapper(sceneObject: SceneObject): SceneComponentCustomWrapper | undefined {
3639
if (sceneObject.componentWrapper) {
3740
return sceneObject.componentWrapper;

packages/scenes/src/core/types.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export interface SceneObject<TState extends SceneObjectState = SceneObjectState>
7272
/** This abstraction declares URL sync dependencies of a scene object. **/
7373
readonly urlSync?: SceneObjectUrlSyncHandler<TState>;
7474

75-
/** Component wrapper, can be used to for edit modes, to wrap some objecs in an edit wrappers */
75+
/**
76+
* Component wrapper, can be used to for edit modes, to wrap objects in an edit wrappers. This component wrapper will
77+
* be used for all children of this object (unless they specify their own wrapper).
78+
**/
7679
readonly componentWrapper?: SceneComponentCustomWrapper;
7780

7881
/** Subscribe to state changes */

0 commit comments

Comments
 (0)